[R] seed

Greg Snow Greg.Snow at imail.org
Mon Apr 26 22:37:38 CEST 2010


The set.seed function works like you show.  If you want to get a little fancier you can use the char2seed function from the TeachingDemos package, then you could set you seed with something like:

> char2seed('jimmy')

Or another string that represents the simulation.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Jimmy Söderly
> Sent: Monday, April 26, 2010 8:46 AM
> To: r-help at r-project.org
> Subject: [R] seed
> 
> Hi everybody,
> 
> How can I set the seed for my simulations ? Is "set.seed(123456)"
> alright ?
> 
> Thanks a lot,
> Jimmy
> 
> 	[[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