Created
October 23, 2014 18:16
-
-
Save Dulani/b8a9bd7c2a5344e7b47c to your computer and use it in GitHub Desktop.
The parallel back end CPU registration code for doParallel/foreach/dplyr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(dplyr) | |
require(parallel) | |
require(foreach) | |
require(doParallel) | |
cpuCount <- detectCores() #From the parallel package | |
registerDoParallel(cores=cpuCount-1) #Don't take all cores. | |
dplyr({put dplyr data arguments here},.parallel=T) #Run dplyr in parallel. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment