[R] Passing data among multiple instances
Greg.Snow at imail.org
Wed Feb 4 21:02:39 CET 2009
Look at the nws package, it has tools for passing data among multiple instances of R (and waiting for data to be ready).
There are other packages that provide some of the same, but from what I remember, nws was fairly simple to set up on a single computer.
Hope this helps,
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
greg.snow at imail.org
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Feng Li
> Sent: Wednesday, February 04, 2009 7:08 AM
> To: r-help at r-project.org
> Subject: [R] Passing data among multiple instances
> Dear R,
> I have two R instances running at the same time, say instance A and
> B. Is there a simpler way to pass the data in A to B?
> More precise, I have a stupid example:
> In instance A, I am running a function "test1"
> test1 <- function (x1)
> x2 <- sin(x1)
> In instance B, another function "test2"
> test2 <- function (x2)
> x3 <- cos(x2)
> where " test2" receives the input from "test1"'s rueslt. "test1" and
> "test2" could be much more complex. They may take one minute each.
> Now the whole procedure is instance A is running, while instance B is
> waiting for the result of instance A. Once instance A is done (instance
> goes to run with new data), instance B should detect A is done, and
> B receives the parameter from instance A. B begins to work. While B is
> waiting for A's new results.
> I want to repeat the loop many times and get x3 in the end.
> Is it possible to do this job? Thanks !
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help