Skip to content

running R commands asynchronously

1 message · Norm Matloff

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

            
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