Actions
Bug #3963
closedRExpression2 - support mixed lists output from R
Start date:
04/07/2009
Due date:
% Done:
0%
Estimated time:
Bugzilla-Id:
3963
Description
The RExpression2 actor does not preserve the type of the elements in the following R snippet:
list(1, "b", 3)
The token generated is:
{{"1.0"}, {"b"}, {"3.0"}}
Which is an Array of String Arrays rather than an array of mixed arrays.
We should preserve as much type information as possible when generating output tokens
Updated by ben leinfelder over 15 years ago
for mixed-type lists that contain strings, all items will end up as strings in Ptolemy. arrayType(scalar, ...) tokens could be created, but only if it was a mix of doubles, integers, and/or booleans (no strings)
Updated by ben leinfelder over 15 years ago
the R expression:
list(1, TRUE, 3)
preserves the numeric/boolean typing in the list:
{{1.0}, {true}, {3.0}}
This is consistent with ptolemy's handling of the mixed array
Actions