Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNG sample() woes #15

Closed
coatless opened this issue Mar 6, 2019 · 0 comments
Closed

RNG sample() woes #15

coatless opened this issue Mar 6, 2019 · 0 comments

Comments

@coatless
Copy link
Contributor

coatless commented Mar 6, 2019

From Kurt:

The check problems with current R-devel are from

 • The default method for generating from a discrete uniform
   distribution (used in sample(), for instance) has been changed.
   ...
   The previous method can be requested using RNGkind() or
   RNGversion() if necessary for reproduction of old results.

To make your package successfully pass the checks for current R-devel
and R-release you may find it most convenient to insert

suppressWarnings(RNGversion("3.5.0"))

before calling set.seed() in your example, vignette and test code (where
the difference in RNG sample kinds matters, of course).

Note that this ensures using the (old) non-uniform "Rounding" sampler
for all 3.x versions of R, and does not add an R version dependency.
Note also that the new "Rejection" sampler which R will use from 3.6.0
onwards by default is definitely preferable over the old one, so that
the above should really only be used as a temporary measure for
reproduction of the previous behavior (and the run time tests relying on
it).

Please correct before 2019-03-20 to safely retain your package on CRAN.

Related to:

https://twitter.com/groundwalkergmb/status/1100190052125237248

https://arxiv.org/pdf/1809.06520.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant