[R] same random numbers in different sessions
Daniel Nordlund
djnordlund at frontier.com
Sat Oct 9 23:39:42 CEST 2010
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> On Behalf Of Liviu Andronic
> Sent: Saturday, October 09, 2010 2:15 PM
> To: r-help at 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
More information about the R-help
mailing list