Project

General

Profile

Actions

Bug #4002

open

RExpression2 - handle arbitrary R data structures

Added by ben leinfelder almost 15 years ago. Updated over 14 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?).


Files

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

Updated by ben leinfelder almost 15 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)

Actions #2

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

Actions #3

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

Actions #4

Updated by ben leinfelder over 14 years ago

tests the various structures are transferred by the JRI implementation.

Actions #5

Updated by Redmine Admin almost 11 years ago

Original Bugzilla ID was 4002

Actions

Also available in: Atom PDF