registerDoSNOW: registerDoSNOW

Description Usage Arguments See Also Examples

View source: R/doSNOW.R

Description

The registerDoSNOW function is used to register the SNOW parallel backend with the foreach package.

Usage

1

Arguments

cl

The cluster object to use for parallel execution.

See Also

makeCluster

Examples

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)

doSNOW documentation built on Feb. 4, 2022, 5:07 p.m.