[R] can you tell what .Random.seed *was*?
G. Jay Kerns
gkerns at ysu.edu
Thu May 14 21:36:13 CEST 2009
Dear R-help,
Suppose I write a script that looks something like this:
#### script.R
set.seed(something)
x <- rnorm(100)
y <- runif(500)
# bunch of other stuff
save.image()
### end of script.R
Now, I give you a copy of my script.R (with the set.seed statement
removed, of course) together with the .RData file that was generated
by the save.image() command.
Question:
1) can you tell me what my original set.seed() value was? (I wouldn't
be able to figure it out, but maybe someone can)
2) is it possible *in principle* to figure out what set.seed was,
given the above? (OK, being able to figure it out in 2*10^68 years
doesn't count, but within a couple months is acceptable.)
3) does the answer change if there is a
remove(.Random.seed)
command right before the save.image() command?
Any thoughts would be appreciated.
Cheers,
Jay
***************************************************
G. Jay Kerns, Ph.D.
Associate Professor
Department of Mathematics & Statistics
Youngstown State University
Youngstown, OH 44555-0002 USA
Office: 1035 Cushwa Hall
Phone: (330) 941-3310 Office (voice mail)
-3302 Department
-3170 FAX
E-mail: gkerns at ysu.edu
http://www.cc.ysu.edu/~gjkerns/
More information about the R-help
mailing list