From becker@g@be @ending from gene@com  Thu Sep 20 19:02:35 2018
From: becker@g@be @ending from gene@com (Gabe Becker)
Date: Thu, 20 Sep 2018 10:02:35 -0700
Subject: [Rd] Bias in R's random integers?
In-Reply-To: <01a56b8e-4e9e-9f3c-1ed7-dd458e0a929f@gmail.com>
References: <CAN_1p9wVX=AR8aYtC2LJo0bgN9cRW3XcbYJqnVHdCzA-QA1ceg@mail.gmail.com>
 <ffb74021-8d95-a820-8013-f0e51dc1a9b3@gmail.com>
 <CAARY7khVi==mZs5o_8fZkTUDDuY-ABwE=gA45COX7qbRgBLhsg@mail.gmail.com>
 <3d7901f0-6b06-89a9-d841-738d2a8307ec@gmail.com>
 <01a56b8e-4e9e-9f3c-1ed7-dd458e0a929f@gmail.com>
Message-ID: <CAMFmJsnDQ+D=kMKdTypScbPtF=o8G6PTRfWkunkbRYy7c5XPnQ@mail.gmail.com>

Hi all,

On Thu, Sep 20, 2018 at 9:30 AM, Paul Gilbert <pgilbert902 at gmail.com> wrote:
>
>
> There are only two small problems that occur to me:
>
> 1/ Researchers that want to have reproducible results (all I hope) need to
> be aware the change has happened. In theory they should have recorded the
> RNG they were using, along with the seed (and, BTW, the number of nodes if
> they generate with a parallel generator). If they have not done that then
> they can figure out the RNG from knowing what version of R they used. If
> they haven't recorded that then they can figure it out by some
> experimentation and knowing roughly when they did the research. If none of
> this works then the research probably should be lost.
>
> As an exercise, researchers might also want to experiment with whether the
> new default qualitatively changes their results. That might lead to
> publishable research, so no one should complain.
>

I was going to suggest helper/convenience functions for this but looking at
?RNG I see that someone has already put in RNGversion which *sets* the RNG
kind to what was used by default in an older version. I do wonder if there
is still value in a function that would *return* it, e.g. for comparisons.
Perhaps RNGversionstr?

Also, would R-core members be interested in a small patch to sessionInfo()
and print.sessionInfo() which makes it so that the current RNGkind is
captured and displayed (respectively) by the sessionInfo machinery? I can
prepare one if so.

Best,
~G

-- 
Gabriel Becker, Ph.D
Scientist
Bioinformatics and Computational Biology
Genentech Research

	[[alternative HTML version deleted]]



[Rd] Bias in R's random integers?
Gabe Becker