Description Usage Arguments Details Examples
Initialize independent uniform random number streams to be used in a SNOW cluster. It uses either the L'Ecuyer's random number generator (package rlecuyer required) or the SPRNG generator (package rsprng required).
1 2 3 4 5 |
cl |
Cluster object. |
type |
|
... |
Arguments passed to the underlying function (see details bellow). |
seed |
Integer value (SPRNG) or a vector of six integer values (RNGstream) used as seed for the RNG. |
prngkind |
Character string naming generator type used with SPRNG. |
para |
Additional parameters for the generator. |
clusterSetupRNG
calls (subject to its argument values) one of
the other functions, passing arguments (cl, ...)
. If the
"SPRNG" type is used, then the function clusterSetupSPRNG
is
called. If the "RNGstream" type is used, then the function
clusterSetupRNGstream
is called.
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.
NOTE: SPRNG is currently not supported.
clusterSetupRNGstream
loads the rlecuyer
package,
creates one stream per node and distributes the stream states
to the nodes.
For more details see https://stat.uiowa.edu/~luke/R/cluster/cluster.html.
1 2 3 4 5 6 | ## Not run:
clusterSetupSPRNG(cl)
clusterSetupSPRNG(cl, seed=1234)
clusterSetupRNG(cl, seed=rep(1,6))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.