| rstream.sample-methods | R Documentation |
Get random sample from an "rstream" object in package rstream.
## S4 method for signature 'rstream,numeric' rstream.sample(stream,n=1) ## S4 method for signature 'rstream,numeric' r(stream,n=1)
stream |
an "rstream" object. |
n |
sample size. |
Methods available for all "rstream" subclasses:
rstream.mrg32k3a-class,
rstream.runif-class.
r is equivalent to rstream.sample.
Josef Leydold josef.leydold@wu.ac.at
rstream.
## create a new rstream object (of subclass rstream.mrg32k3a)
s <- new("rstream.mrg32k3a")
## get a random number
x <- rstream.sample(s)
## get a random sample of size 100
x <- rstream.sample(s,100)
## alternatively ...
x <- r(s,100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.