Learn R Programming

harvestr (version 0.7.1)

reap: Call a function continuing the random number stream.

Description

The reap function is the central function to harvest. It takes an object, x, extracts the previous seed, ie. state of the random number generator, sets the seed, and continues any evaluation. This creates a continuous random number stream, that is completly reproducible.

Usage

reap(x, fun, ..., hash = digest(list(x, fun, ..., source = "harvestr::reap"), "md5"), cache = getOption("harvestr.use.cache", defaults$cache()), cache.dir = getOption("harvestr.cache.dir", defaults$cache.dir()), time = getOption("harvestr.time", defaults$time()), use.try = getOption("harvestr.use.try", !interactive()))

Arguments

x
an object
fun
a function to call on object
...
passed onto function
hash
hash of the list to retrieve the cache from.
cache
use cache, see Caching in harvestr
cache.dir
directory for the cache.
time
should results be timed?
use.try
Should the call be wrapped in try?

Details

The function calling works the same as the apply family of functions.

See Also

withseed, harvest, and with