Last chance! 50% off unlimited learning
Sale ends in
The change in how `set.seed` works in R 3.6 prompted the creation of this R version agnostic replacement to get unit test code to work on multiple versions of R in a Travis-CI build.
set_seed(seed = 1)
argument to set.seed
NULL, invisibly.
It seems RNGkind(sample.kind="Rounding<U+201D>) does not work prior to version 3.6 so I resorted to using version dependent construction of the argument list to set.seed() in do.call().
# NOT RUN {
set_seed(1)
rnorm(5)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab