[R] .Random.seed in R-devel

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Sep 13 22:21:28 CEST 2004


On Mon, 13 Sep 2004, Frank Samuelson wrote:

> I'm running R-2.0.0 (yesterday's snapshot)in its own
> directory, and everything
> works great, except:
> 
>  >    .Random.seed
> Error: Object ".Random.seed" not found
> 
> Does 2.0.0 not use .Random.seed for saving, etc,
> like it says in the help page?

`Like it says on the help page'!

     Initially, there is no seed;  a new one is created from the
     current time when one is required.  Hence, different sessions will
     give different simulation results, by default.

      '.Random.seed' is an integer vector, containing the random number
     generator (RNG) *state* for random number generation in R.  It can
     be saved and restored, but should not be altered by the user.

So .Random.seed does not exist until the state does.  It will after 
runif(1).

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list