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.
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:
withr
cbind.mids()
stores the random generator state of thex
argumentibind.mids()
stores the random generator state of they
argumentI 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 amice
version prior to 3.13.11.