R/lecuyer-cmrg-seed.R
with_lecuyer_cmrg_seed.Rd
With L'Euyer-CMRG Seed
with_lecuyer_cmrg_seed(seed, code)
[integer(1)] The random seed to use to evaluate the code.
[integer(1)]
[any] Code to execute in the temporary environment
[any]
withr::with_seed()
with_lecuyer_cmrg_seed(42, { runif(3) }) #> [1] 0.1738456 0.5547401 0.4833771