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.

Main Tools

There are many elements within the reproducible package. However, there are currently 3 main ones that are critical for reproducible research. The key element for reproducible research is that the code must always return the same content every time it is run, but it must be vastly faster the 2nd, 3rd, 4th etc, time it is run. That way, the entire code sequence for a project of arbitrary size can be run from the start every time.

Function
Objective
CacheA robust wrapper for any function, including those
with environments, disk-backed storage (currently onRaster)
class), operating-system independent, whose first timecalled will execute the function, 2nd time will compare the inputsto a an SQLite database of entries, and recover the first result
if inputs are identical. Ifoptions("reproducible.useMemoise" = TRUE),
the third time will be very fast as it will recover the answer fromRAM
prepInputs
A function to download, or load objects, and possible post processthem. The main advantage to using this over more direct routes isthat it will automatically build checksums tables, use
Cacheinternally where helpful, and possibly run a variety of post processing
actions. This means this function can also itself be cached for evenmore speed. This allows all project data to be stored in custom cloudlocations or in their original online data repositories,
without altering codebetween the first, second, third etc. times
the code is run.
RequireA version of
requirethat incorporates elements of
install.packages,devtools::install_github
,packrat.
It allows for users code to work for a new user on a new machine thatmay or may not have all packages installed.

Package options

See reproducibleOptions for a complete description of package options to configure behaviour.

See also