Description Usage Arguments See Also Examples
The registerDoSNOW
function is used to register the SNOW parallel backend
with the foreach package.
1 | registerDoSNOW(cl)
|
cl |
The cluster object to use for parallel execution. |
1 2 3 4 5 | cl <- makeCluster(2, type="SOCK")
registerDoSNOW(cl)
m <- matrix(rnorm(9), 3, 3)
foreach(i=1:nrow(m), .combine=rbind) %dopar% (m[i,] / mean(m[i,]))
stopCluster(cl)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.