Project

General

Profile

Bug #4002

RExpression2 - handle arbitrary R data structures

Added by ben leinfelder over 10 years ago. Updated almost 10 years ago.

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

0%

Estimated time:
Bugzilla-Id:
4002

Description

Not everything in R fits into the Ptolemy types (nor the JRI types, for that matter).
The lm() method, for instance, returns something special.
It's been proposed (a few times) that there should be an RObjectToken to handle such cases so that at least R actors can communicate between each other with out loss/mutation of data.
The RExpression1 actor used file-based serialization to get around this limitation. We could attempt to use a hybrid approach for RExpression2 - mixing JRI with file-based serialization (best of both worlds?).

R2-arbitrary.xml (33.9 KB) R2-arbitrary.xml ben leinfelder, 08/18/2009 03:18 PM

History

#1 Updated by ben leinfelder over 10 years ago

Here is an example script that creates different data objects:
x <- 1:10
y <- x + rnorm(10)
f <- y ~ x
l <- lm(f)
s <- summary(l)

#2 Updated by ben leinfelder about 10 years ago

added handling (from the old RExpression1 implementation) for [un]serializing complex R data objects to disk.
This is working for dataframes at the moment. More testing for complex types to come...

#3 Updated by ben leinfelder almost 10 years ago

in the example cases given, all but the structure produced by ~ were transferred from one R actor the the other.
This is the debug output:

f <- (y ~ x)

Result: nil

#4 Updated by ben leinfelder almost 10 years ago

tests the various structures are transferred by the JRI implementation.

#5 Updated by Redmine Admin over 6 years ago

Original Bugzilla ID was 4002

Also available in: Atom PDF