set.seed(x)
On Jun 13, 2013, at 18:32, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
On 13/06/2013 11:59 AM, Pooya Lalehzari wrote:
Hello, If I use set.seed(x) to set a seed for the random number generator, how can I undo that to revert a random output every time I run my code?
If you remove .Random.seed, then the next time a seed is needed it will be generated from the system clock, so it will appear random.
Also, in recent versions of R (>= 3.0.0 I believe) set.seed(NULL) will do the same. MW
Duncan Murdoch
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.