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

Randomseed #432

Merged
merged 3 commits into from
Sep 23, 2021
Merged

Randomseed #432

merged 3 commits into from
Sep 23, 2021

Conversation

stefvanbuuren
Copy link
Member

This PR is a response to request #426. It implements local seed values that do not interfere with the calling code, and hence minimises side effect on .GlobalEnv. This is especially useful for complex simulations.

Some decision made:

  • Added a dependency to withr
  • Needed to change the hard-coded values in some tests
  • cbind.mids() stores the random generator state of the x argument
  • ibind.mids() stores the random generator state of the y argument

I tried to maintain compatibility with earlier version, but there are no guarantees. The changes made here may render existing code irreproducible, especially if you use the random generator between multiple calls to mice. If you want exact reproducibility in such cases, I fear the only possibility is to install a mice version prior to 3.13.11.

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

Successfully merging this pull request may close these issues.

1 participant