[R] multiple core

Uwe Ligges ligges at statistik.tu-dortmund.de
Wed Aug 21 17:19:20 CEST 2013



On 20.08.2013 21:05, Andrea Lamont wrote:
> Hello:
>
> I have somewhat of a generic question.  How do you use multiple CPU/core
> processors in R?  For those familiar with Mplus software, I'm looking for
> something analogous to PROCESSORS command in Mplus to speed up processing.
>   I searched previous helps/googled it and see that there is a multicore and
> parallel package, but I am not understanding how to use these packages.  Is
> there a straightforward way to tell R to use more than one processor?
>
> In my search, I found this:
> Sys.setenv(MC_CORES=12)
> but am unsure what it does...

You have to write code that can be executed in parallel. The parallel 
package helps, see its documentation.

Best,
Uwe Ligges




> Thanks!
> Andrea
>



More information about the R-help mailing list