Full_Name: Lara Jamieson Version: 1.1.1 OS: Linux Submission from: (NULL) (131.111.20.203) I've checked for other reports on this and can't find anything. It seems that the .Random.seed isn't updated properly after using rm(.Random.seed). Mu understanding from the help file indicates that a new 'random' seed will be generated. It appears that sometimes the old one is just reinstated. I removed my .RData file and the problem remains. It seems to happen when calls are made in succession to the same 'random generation type' function; but appears to work when different calls are made in succession. An example is given below. I was using the sample command when I found the problem but it happens with runif as well...> runif(1)[1] 0.5551602> runif(1)[1] 0.2575637> rm(.Random.seed) > runif(1)[1] 0.5551602> rm(.Random.seed) > rm(.Random.seed)Warning message: remove: variable ".Random.seed" was not found> runif(1)[1] 0.2575637 Thanks, Lara -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> "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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> "MM" == Martin Maechler <maechler@stat.math.ethz.ch> writes:>>>>> "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 MM> [I don't get your behavior] Could it be that you have a MM> .Random.seed further up in your search() path? This would explain MM> everything. Well I *could* reproduce the bogous behavior in R 1.1.1, after all. The problem is that .Random.seed is not only in .GlobalEnv, but also "Autoloads" : R --vanilla > runif(1) [1] 0.4659391 > find(".Random.seed") [1] ".GlobalEnv" "Autoloads" > all.equal(.Random.seed, get(".Random.seed", envir = .AutoloadEnv)) [1] TRUE and hence, after rm(.Random.seed), runif(*) still gets the one from the autoloads... This bug has just been fixed in R-devel (by an expert, not me!), together with the even more peculiar > library(stepfun) > AbC <<- "Z" > find("AbC") [1] ".GlobalEnv" "package:stepfun" "Autoloads" {but you were told never to use "<<-" ;-) } -- Martin -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._