rstream.RNG(stream) is used to set a given
stream as current global R uniform random
Without an argument (or
NULL) it returns an "rstream" object
that contains the current global generator.
It is a copy (clone) of the global generator and thus it can be
handled independently from the global generator.
rstream.RNG returns an "rstream" object.
Josef Leydold [email protected]
1 2 3 4 5 6 7 8 9 10 11 12 13 14
## create a new rstream.runif object s <- new("rstream.mrg32k3a") ## use this stream as global R uniform RNG rstream.RNG(s) ## get a (idenpendent) copy of the stream ## that contains the global R uniform RNG gs <- rstream.RNG() ## change the state of the global generator gs <- rstream.RNG() rstream.nextsubstream(gs) rstream.RNG(gs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.