with_rng_state {rush} | R Documentation |
Set RNG Sate before Running a Function
Description
This function sets the rng state before running a function. Use with caution. The global environment is changed.
Usage
with_rng_state(fun, args, seed)
Arguments
fun |
( |
args |
( |
seed |
( |
Value
any
Examples
with_rng_state(runif, list(n = 1), .Random.seed)
[Package rush version 0.1.2 Index]