Project

General

Profile

Actions

Bug #3963

closed

RExpression2 - support mixed lists output from R

Added by ben leinfelder over 15 years ago. Updated over 15 years ago.

Status:
Resolved
Priority:
Normal
Category:
actors
Target version:
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

Actions #1

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)

Actions #2

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 #3

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 3963

Actions

Also available in: Atom PDF