[R] running R commands asynchronously

Norm Matloff matloff at cs.ucdavis.edu
Mon Jun 13 08:19:02 CEST 2011


On 06/10/2011 02:29 PM, Richard M. Heiberger wrote:

> I am interested in running R commands asynchronously...

You can do this with my Rdsm package on CRAN.

Set up 2 Rdsm clients, which I'll call A and B.  Use client A as you
main R session, where you do most of your work, but start your
asynchronous process in B, writing to memory shared by A and B.

The code at B would look like:

   run task B, writing results to shared variable X[1] when done

The code at A would look like:

   do various unrelated tasks
   while (X[1] == 0) ;  
   use X[1]

Norm Matloff



More information about the R-help mailing list