[R] Saving Seed In a Lopp

Simon Bonner s.bonner at stat.ubc.ca
Sun Oct 11 22:03:51 CEST 2009

Hey Galois (?),

See the help file for set.seed() (help(set.seed)).

In short, the current seed is stored in the variable .Random.seed. You
can save the seed with:
myseed <- .Random.seed

Hope that helps,


Simon Bonner
Post-Doctoral Fellow
Department of Statistics, UBC


On Sun, 2009-10-11 at 15:33 -0400, Galois Theory wrote:
> I'm trying to save the random seed in a for loop. How can one go about doing
> that and preserving the seed for the next session.
> 	[[alternative HTML version deleted]]
> ______________________________________________
> 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.

More information about the R-help mailing list