Reset "rstream" object in package rstream into its initial state.
By resetting the stream object the same stream of random numbers can be generated.
## S4 method for signature 'rstream' rstream.reset(stream)
an "rstream" object.
Methods available for all "rstream" subclasses:
Josef Leydold [email protected]
1 2 3 4 5 6 7 8 9 10 11 12
## create a new rstream object (of subclass rstream.mrg32k3a) s <- new("rstream.mrg32k3a") ## generate a sample x <- rstream.sample(s,10) ## reset the stream object rstream.reset(s) ## the new sample y is identical to x y <- rstream.sample(s,10) if (identical(x,y)) print("x and y are identical samples")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.