> -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Liviu Andronic > Sent: Saturday, October 09, 2010 2:15 PM > To: r-help@r-project.org Help > Subject: [R] same random numbers in different sessions > > Dear all > I'm using Xubuntu Lucid and I keep getting the same random numbers > whenever I start a new session of R. For example, I keep getting > > sample(1:1000, 1) > [1] 87 > > or > > rnorm(1:10) > [1] -1.3618103 0.4241701 1.0720076 0.2208145 -0.5375314 -0.4846588 > [7] 0.7576768 0.6527407 -0.6868786 0.8718527 > > I expected that some set.seed() instruction woudl be present in a > config file in > /usr/lib/R/etc/ > > but after grepping the only reference came out in Rprofile.site and it > was commented out: > # set.seed(1234) > > What else could be causing this? Regards > Liviu >
Could you be reloading a workspace at start-up that is setting the seed? What happens if you start R using the --vanilla option? Dan Daniel Nordlund Bothell, WA USA ______________________________________________ R-help@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.