O'Reilly logo

Data Analysis with R - Second Edition by Tony Fischetti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting started with parallel R

Getting started with parallelization in R requires minimal setup, but that setup varies from platform to platform. More accurately, the setup is different for Windows than it is for every other operating system that R runs on (GNU/Linux, Mac OS X, Solaris, *BSD, and others).

If you don't have a Windows computer, all you have to do to start is to load the parallel package:

# You don't have to install this if your copy of R is new 
library(parallel)

If you use Windows, you can either switch to the free operating system that over 97% of the 500 most powerful supercomputers in the world use, or you can run the following setup code:

library(parallel) 
cl <- makeCluster(4)

You may replace the 4 with however many processes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required