RNGStreams | R Documentation |
These functions provide utilities for working with multiple streams of pseudo-random numbers.
RNGStreams(n = length(size), size = 1L)
getRNGStream()
setRNGStream(seed = NULL, kind = NULL)
n |
The number of RNG streams to create. |
size |
If |
seed |
A valid RNG stream to assign to |
kind |
The |
For RNGStreams
, a list of length n
with RNG streams (with elements named seed
and kind
) for use with setRNGStream
.
Kylie A. Bemis
RNGkind
,
nextRNGStream
# create parallel RNG streams
register(SerialParam())
RNGkind("L'Ecuyer-CMRG")
set.seed(1)
seeds <- RNGStreams(4)
seeds
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.