Set seed in parallel compatible way
When the parallel package is used, setting the RNG seed for reproducibility
involves more than simply calling set.seed(). set.rseed takes
care of the additional overhead.
set.rseed(seed)
seed |
seed for the random number generator |
If the parallel package is not on the search path, then set.seed() is called.
If parallel is on the search path, then the RNG kind is set to "L'Ecuyer-CMRG",
the seed is set and mc.reset.stream is called.
# These should give identical results, even if the `parallel' package is loaded. set.rseed(123); do(3) * resample(1:10, 2) set.rseed(123); do(3) * resample(1:10, 2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.