Bug #3961
closedRExpression2 - support arrayType(scalar, ....) tokens
0%
Description
a "mixed" array token can be generated, as in the Ptolemy expression:
{1, 2.3, true}
the type then looks like this:
arrayType(scalar,3)
The RExpression2 actor needs to handle this heterogeneous array accordingly (hopefully we can preserve the type information for each item in the array).
Note: if the array contains a string token, the entire array becomes an arrayType(string...)
Updated by ben leinfelder over 15 years ago
1. Added support for treating these arrays as containing all string elements.
2. Looking into how we might preserve each element's type when setting the token in R.
At least it won't throw an error now. Downstream processes (R scripts) will have to be savvy about converting from string representations to number/boolean if need be.
Updated by ben leinfelder over 15 years ago
This bug should now read: "Scalar Arrays should not be treated as String Arrays"
might end up closing it if I can't get JRI to handle the heterogeneous array
Updated by ben leinfelder over 15 years ago
My only guess with handling heterogenous array items is to use the low-level rniPut(...) methods in JRI and manually assemble the data structures from their memory addresses. (Ick factor multiplying rapidly!)