From radford at cs.toronto.edu  Sat Mar 22 18:32:37 2014
From: radford at cs.toronto.edu (Radford Neal)
Date: Sat, 22 Mar 2014 13:32:37 -0400
Subject: [Rd] Varying results of package checks due to random seed
In-Reply-To: <mailman.23.1395486006.17262.r-devel@r-project.org>
References: <mailman.23.1395486006.17262.r-devel@r-project.org>
Message-ID: <20140322173237.GA22878@cs.toronto.edu>

> From: Philippe GROSJEAN <Philippe.GROSJEAN at umons.ac.be>
>
> ... for latest CRAN version, we have successfully installed 4999
> packages among the 5321 CRAN package on our platform. ... It is
> strange that a large portion of R CMD check errors on CRAN occur and
> disappear *without any version update* of a package or any of its
> direct or indirect dependencies! That is, a fraction of errors or
> warnings seem to appear and disappear without any code update. 

Some of these are likely the result of packages running tests using
random number generation without setting the random numbers seed, in
which case the seed is set based on the current time and process id,
with an obvious possibility of results varying from run to run.

In the current development version of pqR (in branch 19-mods, found at
https://github.com/radfordneal/pqR/tree/19-mods), I have implemented a
change so that if the R_SEED environment variable is set, the random
seed is initialized to its value, rather than from the time and
process id.  This was motivated by exactly this problem - I can now
just set R_SEED to something before running all the package checks.

   Radford Neal



[Rd] Varying results of package checks due to random seed
Radford Neal