[Rd] .Random.seed resetting (PR#656)

maechler@stat.math.ethz.ch maechler@stat.math.ethz.ch
Mon, 11 Sep 2000 15:10:24 +0200 (MET DST)


>>>>> "lej25" == lej25  <lej25@statslab.cam.ac.uk> writes:

    lej25> Full_Name: Lara Jamieson Version: 1.1.1 OS: Linux Submission
    lej25> from: (NULL) (131.111.20.203)

    lej25> I've checked for other reports on this and can't find anything.
    lej25> It seems that the .Random.seed isn't updated properly after
    lej25> using rm(.Random.seed).  Mu understanding from the help file
    lej25> indicates that a new 'random' seed will be generated.  It
    lej25> appears that sometimes the old one is just reinstated.

    lej25> I removed my .RData file and the problem remains.  It seems to
    lej25> happen when calls are made in succession to the same 'random
    lej25> generation type' function; but appears to

    lej25> work when different calls are made in succession.  An example is
    lej25> given below.  I was using the sample command when I found the
    lej25> problem but it happens with runif as well...

    >> runif(1)
    lej25> [1] 0.5551602
    >> runif(1)
    lej25> [1] 0.2575637
    >> rm(.Random.seed) runif(1)
    lej25> [1] 0.5551602
    >> rm(.Random.seed) rm(.Random.seed)
    lej25> Warning message: remove: variable ".Random.seed" was not found
    >> runif(1)
    lej25> [1] 0.2575637


[I don't get your behavior]
Could it be that you have a .Random.seed further up in your search() path?
This would explain everything.

Try
    find(.Random.seed, where = TRUE)

which would show you the place where you had another copy if that was the
solution ...

-- 
Martin Maechler <maechler@stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO D10	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._