drake

data frames in R for Make

William Michael Landau

2017-03-06

Drake is a workflow manager for R. When it runs a project, it automatically builds missing and outdated results while skipping the up-to-date output. This automation and reproducibility is important for data analysis workflows, especially large projects under heavy development.

Acknowledgements and history

The original idea of a time-saving reproducible build system extends back decades to GNU Make, which today helps data scientists as well as the original user base of complied-language programmers. More recently, Rich FitzJohn created remake, a breakthrough reimagining of Make for R and the most important inspiration for drake. Drake is a fresh reinterpretation of some of remake’s pioneering fundamental concepts, scaled up for computationally-demanding workflows. Relative to remake, some of drake’s most prominent distinguishing features at the time of writing this document are

Thanks also to Kirill Müller and Daniel Falster. They contributed code patches and enhancement ideas to my parallelRemake and remakeGenerator packages, which I have now subsumed into drake.

Rtools for Windows users

Windows users need Rtools to run make(..., parallelism = "Makefile") (system2("make") needs to be possible).

Help and troubleshooting

For troubleshooting, please refer to TROUBLESHOOTING.md on the GitHub page for instructions.

Quickstart examples

Drake has small self-contained built-in examples. To see the names of the available examples, use

examples_drake()
## [1] "basic"

Then use example_drake() to write the files for the example to your working directory.

example_drake("basic")

Step through the code files to get started.

Tutorials

The CRAN page links to multiple tutorials and vignettes. With drake installed, you can load any of the vignettes in an R session.

vignette(package = "drake") # List the vignettes.
vignette("drake") # High-level intro.
vignette("quickstart") # Walk through a simple example.