Description Usage Arguments Details Value Note See Also
Do a computation with a given seed.
safe version of retrieving the .Random.seed
Get or Set Current Seed - Safe Version
1 2 3 4 5 6 7 8 9 10 | withseed(seed, expr, envir = parent.frame(),
cache = getOption("harvestr.use.cache", defaults$cache()),
cache.dir = getOption("harvestr.cache.dir", defaults$cache.dir()),
time = getOption("harvestr.time", defaults$time()))
get.seed()
replace.seed(seed, delete = TRUE)
GetOrSetSeed()
|
seed |
a valid seed value |
expr |
expression to evaluate. |
envir |
the |
cache |
should results be cached or retrieved from cache. |
cache.dir |
Where should cached results be saved to/retrieve from. |
time |
should results be timed? |
delete |
logical to delete if |
Compute the expr with the given seed, replacing the global seed after compuatations are finished.
does not replace the global .Random.seed
Replaces the .Random.seed with seed unless seed is null, then it will delete the .Random.seed if delete=T
Always returns a valid seed. Useful for grabbing a seed used to generate a random object.
the .Random.seed if defined, otherwise NULL
a valid .Random.seed value.
Not parallel compatible, this modifies the global environment, while processing.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.