Package 'doSNOW'

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: 2024-11-03 04:20:34 UTC
Source: https://github.com/cran/doSNOW

Help Index


registerDoSNOW

Description

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

Usage

registerDoSNOW(cl)

Arguments

cl

The cluster object to use for parallel execution.

See Also

makeCluster

Examples

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)