with_rng_state {rush} | R Documentation |
This function sets the rng state before running a function. Use with caution. The global environment is changed.
with_rng_state(fun, args, seed)
fun |
( |
args |
( |
seed |
( |
any
with_rng_state(runif, list(n = 1), .Random.seed)