[R] Random number generation

Dimitrios Rizopoulos Dimitris.Rizopoulos at med.kuleuven.be
Thu Jun 1 22:01:45 CEST 2006


according to ?.Random.seed, `Note' section, different R sessions give 
differen simulation results; maybe each time you start R you load a 
previously saved workspace, with an existing .Random.seed, i.e., check 
if the .Random.seed value is the same each time you start R.

I hope it helps.

Best,
Dimitris

---- 
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


Quoting Carl <carl at mcs.st-and.ac.uk>:

> Hi All.
> (This is probably an incredibly stupid question :))
> 
> I have just noticed that every time I start an R2.3 session and
> request 
> a random number (say with rnorm) that I receive the same number.
> AFAIK I 
> have not set a seed at any point. Returning to an older version of 
> R(v1.8) I get the behaviour that I have come to expect, where a new
> seed 
> is automatically generated for each new session (actually it was a 
> student running bootstraps on multiple machines that has noticed
> this).
> 
> I am running R2.3 for windows on winXP pro, AMD Athlon 2400+.
> 
> Thanks in advance and be gentle.
> C
> 
> <...retreats and waits for imminent admonishment...>
> 
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dr. Carl Donovan
> Research Fellow in Statistical Computing
> Ph +44 1334 461802
> The Observatory
> Buchanan Gardens
> University of St Andrews
> St Andrews
> Fife
> KY16 9LZ
> Scotland
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
> 
> 


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the R-help mailing list