Description Usage Arguments Details Author(s)
This function has no documentation yet
1 | snowCluster(n = parallel::detectCores(),scripts = c("./init.R"))
|
n |
number of workers |
scripts |
R scripts to execute in each worker |
this function execute this code:
snowCluster = function(n = parallel::detectCores(),scripts = c("./init.R")){
safeLibrary("doSNOW")
cl = makeSOCKcluster(n,outfile="cl.txt")
registerDoSNOW(cl)
lapply(scripts, function(x) clusterCall(cl,source,x))
return(cl)
}
Daniel Fischer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.