Is it possible to do concurrent programming in R
For example, running 2 functions with while(TRUE) loops concurrently.
The snow, Rmpi, and pvm packages have supported this for almost a decade, initially across computers and also on a multi-cpu or multi-core machine.
The multicore package added a the ability to do this on multi-core machines.
Since R 2.14.0, the parallel package has bundled parts of snow and multicore in the basic R distribution. This may be your best starting point now.
A few parts of R itself also use multi-threaded programming, but that approach is limited due to some architectural constraints that are unlikely to be lifted.
We wrote a survey paper on parallel programming with R a few years ago which is still relevant.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With