targets
The targets
package is a
Make-like pipeline toolkit for
Statistics and data science in R. With targets
, you can maintain a
reproducible workflow without repeating yourself. targets
learns how
your pipeline fits together, skips costly runtime for tasks that are
already up to date, runs only the necessary computation, supports
implicit parallel computing, abstracts files as R objects, and shows
tangible evidence that the results match the underlying code and data.
For deep dives into why and how to use targets
, please see the user
manual.
What about drake
?
The drake
package is an older and
more established R-focused pipeline toolkit. It is has become a key
piece of the R ecosystem, and development will continue. However, nearly
four years of community feedback have exposed major user-side
limitations regarding data management, collaboration, and parallel
efficiency. Unfortunately, these limitations are permanent. Solutions in
drake
itself would make the
package incompatible with existing projects that use it, and the
internal architecture is too copious, elaborate, and mature for such
extreme refactoring. That is why targets
was created. The targets
package borrows from past learnings, user suggestions, discussions,
complaints, success stories, and feature requests, and it improves the
user experience in ways that will never be possible in
drake
. Please see the statement
of need for
details.
Installation
Install the GitHub development version to access the latest features and patches.
library(remotes)
install_github("wlandau/targets")
Documentation
- Manual: deep dives into
why and how to use
targets
. - Reference: package website.
- Functions: documentation and examples of all user-side functions.
Examples
Courses
Helpers
tarchetypes
: an R package to help define specialized targets such as dependency-aware R Markdown reports.targetsketch
: a Shiny app to help sketch pipelines (app, source).
Specification
- Statement of
need: the
role of the
targets
package and why it was created alongsidedrake
. - Data management strategy and data store architecture.
- Orchestration: the mental model of target orchestration and dynamic branching.
- Composition:
the object composition structure of the
target
class and its fields. - OOP: the
object oriented programming model of
targets
.
Participation
Development is a community effort, and we welcome discussion and contribution. By participating in this project, you agree to abide by the code of conduct and the contributing guide.