R package that automatically uses several cores?

Marco picture Marco · Jan 23, 2011 · Viewed 89.8k times · Source

I have noticed that R only uses one core while executing one of my programs which requires lots of calculations. I would like to take advantage of my multi-core processor to make my program run faster. I have not yet investigated the question in depth but I would appreciate to benefit from your comments because I do not have good knowledge in computer science and it is difficult for me to get easily understandable information on that subject.

Is there a package that allows R to automatically use several cores when needed?

I guess it is not that simple.

Answer

Gavin Simpson picture Gavin Simpson · Jan 23, 2011

R can only make use of multiple cores with the help of add-on packages, and only for some types of operation. The options are discussed in detail on the High Performance Computing Task View on CRAN

Update: From R Version 2.14.0 add-on packages are not necessarily required due to the inclusion of the parallel package as a recommended package shipped with R. parallel includes functionality from the multicore and snow packages, largely unchanged.