Built on top of git2r and archivist, this package aims at making high-level, robust, machine and OS independent tools for making deeply reproducible and reusable content in R. This extends beyond the package management utilities of packrat and checkpoint by including tools for caching, and accessing GitHub repositories.

Package options

reproducible has the following options to configure behaviour:

  • reproducible.cachePath: The default path for repositories if not passed as an argument. The default is the tempdir() of the session.

  • reproducible.useMemoise: Default is TRUE. When the Cache mechanism determines that it has already run a particular function based on the digest (hash) of its input parameters, it will load the object from disk (an .rda file indexed in an SQLite database), but it will memoise that step. Thus, the third time the function is run with identical arguments, it will use the memoised copy (i.e., RAM copy) which can be substantially faster. Since memoising is session specific, the memoised version won't be retrieved until the second time in a session. clearCache of any sort will cause all memoising to be 'forgotten' (memoise::forget).

  • reproducible.quick: Default is FALSE. This means that all hashing will be run on full objects but only file.size for any file paths. If TRUE, then full objects and file content will be hashed. Because the hash will be different between quick = TRUE and quick = FALSE, hashing will effectively be independent between the two states.

  • reproducible.useragent: User agent for downloads using this package. Default is "http://github.com/PredictiveEcology/reproducible".

  • reproducible:verbose: Default is FALSE. This is the normal setting. If set to TRUE then every Cache call will show a summary of the objects being cached, their object.size and the time it took to digest them and also the time it took to run the call and save the call to the cache repository or load the cached copy from the repository.

See also