Learn R Programming

snow (version 0.1-1)

snow-rand: Uniform Random Number Generation in SNOW Clusters

Description

Initialize independent uniform random number streams on the nodes in a SNOW cluster.

Usage

clusterSetupSPRNG (cl, seed = round(2^32 * runif(1)),
                   prngkind = "default", para = 0)

Arguments

cl
cluster object
seed
integer seed for SPRNG
prngkind
character string naming generator type
para
additional parameters for the generator

Details

clusterSetupSPRNG loads the rsprng package and initializes separate streams on each node. For further details see the documentation of init.sprng. The generator on the master is not affected.

For more details see http://www.stat.uiowa.edu/~luke/R/cluster/cluster.html.

Examples

Run this code
clusterSetupSPRNG(cl)
clusterSetupSPRNG(cl, seed=1234)

Run the code above in your browser using DataLab