## 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)
Run the code above in your browser using DataLab