[R] Static random numbers
marc_schwartz at comcast.net
Thu Dec 4 01:29:27 CET 2008
on 12/03/2008 06:10 PM Bastian Offermann wrote:
> can anybody help me out saving random numbers? What I am doing is to
> generate a series of random numbers and keep it as a zoo object.
> z <- 1000
> rn1 <- as.zoo(rnorm(z))
> The random numbers will be analyzed and described in a LaTeX document,
> so I have to keep them static somehow. The fact that they are kept
> as a zoo object should not be of too much concern here. Thanks in advance.
> Bastian Offermann
See ?set.seed, which will allow you to specify the seed for the RNG, so
that you can reproduce the same sequence again in the future:
rn1 <- as.zoo(rnorm(1000))
More information about the R-help