harvestr: A Simple Reproducible Parallel Simulation Framework

Description Caching Options Author(s)


harvestr package


The functions in harvestr can cache results for faster and interuptible simulations. This option defaults to FALSE but can be chosen by specifying the cache parameter in any of the functions that produce results.

The caching is performed by saving a RData file in a specified caching directory. The default directory is named "harvestr-cache" and resides under the working directory. This can be specified by setting the harvestr.cache.dir option. Files in this directory use file names derived from hashes of the expression to evaluate. Do not modify the file names.


The following options control behavior and default values for harvestr.

  1. harvestr.use.cache=FALSE - Should results be cached for fault tollerance and accelerated reproducability?

  2. harvestr.cache.dir="harvestr-cache" - The directory to use for storing cached results.

  3. harvestr.time=FALSE - Should results be timed?

  4. harvestr.use.try=!interactive() - Should the vectorized calls use try to increase fault tollerance?

  5. harvestr.try.silent=FALSE - Should try be run silently?

  6. harvestr.try.summary=TRUE - Print a result if errors were found?

  7. harvestr.parallel - Run results in parallel? Default is to run in parallel if a parallel back end is registered and the call is the uppermost harvestr call.

  8. harvestr.progress - Use a progress bar? Default is to show a bar in interactive mode for top level call, but the type is platform dependent.


Andrew Redd <amredd_at_gmail.com>

The harvestr package is a framework for parallel reproducible simulations.

The functions to know about are:

  1. gather - which gathers parallel seeds.

  2. farm - which uses the saved seeds from gather to replicate an expression, once for each seed.

  3. harvest - which uses objects from farm, that have saved seed attributes, to continue evaluation from where farm finished.

  4. reap - is used by harvest for a single item

  5. plant - is used to set seeds for a list of predefined objects so that harvest can be used on it.

  6. sprout - Generate independent sub-streams.

  7. graft - Replicate and object in independent substreams of random numbers.

harvestr documentation built on May 30, 2017, 2:39 a.m.