Applies ToRevolution Analytics

numCoresToUse (and rxOptions, in general) is related only to setting up distributed computing for RevoScaleR functions. foreach and doParallel do not use it. To run your script in parallel mode, you will need to first register a parallel backend for your foreach command.  Instead of setting numCoresToUse, use

library(doParallel} registerDoParallel(cores=6)

getDoParWorkers() should return 6 at this point. This sets up a "compute cluster" across each core, each of which can run an R process and communicate over sockets with the others. Some additional resources on using foreach and doParallel that will explain more options on running in parallel:http://cran.r-project.org/web/packages/foreach/vignettes/foreach.pdf http://cran.r-project.org/web/packages/doParallel/vignettes/gettingstartedParallel.pdf

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.