[Rd] FW: [R] same random numbers in different sessions

G. Jay Kerns gkerns at ysu.edu
Wed Oct 13 01:37:19 CEST 2010


Dear Paul,

On Tue, Oct 12, 2010 at 5:16 PM, Paul Gilbert
<pgilbert at bank-banque-canada.ca> wrote:
> From R-help
> ...
>>I notice that you have the IPSUR package loaded;  you know, just a
>>shot in the dark here, but did you try not loading it?
>>
>>I ask because the vignette is built by making a special choice for
>>set.seed, and the workspace that ships with the package might be
>>interacting in an unexpected way.
>
> Is it possible that a package can save a set seed and have the effect that users get when they save a workspace with the seed set? I think not, but if so, can we check that packages do not save a random seed?
>

Yes, it is possible.  For example, in principle, a person could
include a workspace in the /data subdirectory of the package (which
has had the seed set) and load the workspace when the package is
loaded with the .First.lib function.  That's not what I did, though,
and it was not what I had in mind when I wrote that earlier reply to
R-help.  At that time I was worried that maybe I goofed and forgot to
remove .Random.seed in the vignette, or something else was happening
that I didn't understand.  Turns out I didn't forget and everything is
fine.

Maybe somebody else could come up with a reason why a person would
want the ability to load a .Random.seed with a package, though I don't
have one off the top of my head.

Regards,
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
VoIP: gjkerns at ekiga.net
E-mail: gkerns at ysu.edu
http://people.ysu.edu/~gkerns/



More information about the R-devel mailing list