The main resources to learn drake
are
Thanks to Kirill for preparing a drake
cheat sheet for the workshop.
The FAQ page is an index of links to appropriately-labeled issues on GitHub. To contribute, please submit a new issue and ask that it be labeled as a frequently asked question.
The reference section lists all the available functions. Here are the most important ones.
drake_plan()
: create a workflow data frame (like my_plan
).make()
: build your project.loadd()
: load one or more built targets into your R session.readd()
: read and return a built target.drake_config()
: create a master configuration list for other user-side functions.vis_drake_graph()
: show an interactive visual network representation of your workflow.outdated()
: see which targets will be built in the next make()
.deps()
: check the dependencies of a command or function.failed()
: list the targets that failed to build in the last make()
.diagnose()
: return the full context of a build, including errors, warnings, and messages.Thanks to Kirill for constructing two interactive learnr
tutorials: one supporting drake
itself, and a prerequisite walkthrough of the cooking
package.
Drake
also has built-in example projects with code files available here. You can generate the files for a project with drake_example()
(e.g. drake_example("gsp")
), and you can list the available projects with drake_examples()
. The beginner-oriented examples are listed below. They help you learn drake
’s main features, and they show one way to organize the files of drake
projects.
main
: drake
’s main example, based on Kirill Müller’s drake
pitch. This is the most accessible example for beginners.gsp
: A concrete example using real econometrics data. It explores the relationships between gross state product and other quantities, and it shows off drake
’s ability to generate lots of reproducibly-tracked tasks with ease.packages
: A concrete example using data on R package downloads. It demonstrates how drake
can refresh a project based on new incoming data without restarting everything from scratch.mtcars
: An old example that demonstrates how to generate large workflow plan data frames using wildcard templating. Use load_mtcars_example()
to set up the project in your workspace.Here are some real-world applications of drake
in the wild.
If you have a project of your own, we would love to add it. Click here to edit the README.Rmd
file.
For context and history, check out this post on the rOpenSci blog and episode 22 of the R Podcast.
Special thanks to Jarad Niemi, my advisor from graduate school, for first introducing me to the idea of Makefiles for research. He originally set me down the path that led to drake
.
Many thanks to Julia Lowndes, Ben Marwick, and Peter Slaughter for reviewing drake for rOpenSci, and to Maëlle Salmon for such active involvement as the editor. Thanks also to the following people for contributing early in development.