| Title: | Foreach Parallel Adaptor for the 'snow' Package |
|---|---|
| Description: | Provides a parallel backend for the %dopar% function using the snow package of Tierney, Rossini, Li, and Sevcikova. |
| Authors: | Folashade Daniel [cre], Microsoft Corporation [aut, cph], Stephen Weston [aut] |
| Maintainer: | Folashade Daniel <[email protected]> |
| License: | GPL-2 |
| Version: | 1.0.20 |
| Built: | 2026-06-06 06:33:08 UTC |
| Source: | https://github.com/cran/doSNOW |
The registerDoSNOW function is used to register the SNOW parallel backend
with the foreach package.
registerDoSNOW(cl)registerDoSNOW(cl)
cl |
The cluster object to use for parallel execution. |
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)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)