This function sets the rng state before running a function. Use with caution. The global environment is changed.
Examples
with_rng_state(runif, list(n = 1), .Random.seed)
#> [1] 0.08075014
This function sets the rng state before running a function. Use with caution. The global environment is changed.
with_rng_state(runif, list(n = 1), .Random.seed)
#> [1] 0.08075014