Project

General

Profile

Actions

Bug #3961

closed

RExpression2 - support arrayType(scalar, ....) tokens

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

Status:
Resolved
Priority:
Normal
Category:
actors
Target version:
Start date:
04/07/2009
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
3961

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...)

Actions #1

Updated by ben leinfelder about 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.

Actions #2

Updated by ben leinfelder about 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

Actions #3

Updated by ben leinfelder about 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!)

Actions #4

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 3961

Actions

Also available in: Atom PDF