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 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")

Help

Documentation

  • User manual: in-depth discussion about how to use targets.
  • Reference website: formal documentation of all user-side functions, the statement of need, and multiple design documents of the internal architecture.

Extensions

  • tarchetypes: helpers to define specialized targets such as dependency-aware R Markdown reports.
  • stantargets: a workflow framework for reproducible Stan pipelines.

Apps

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.

Citation

citation("targets")
#> Warning in citation("targets"): no date field in DESCRIPTION file of package
#> 'targets'
#> Warning in citation("targets"): could not determine year for 'targets' from
#> package DESCRIPTION file
#> 
#> To cite package 'targets' in publications use:
#> 
#>   William Michael Landau (NA). targets: Dynamic Function-Oriented
#>   'Make'-Like Declarative Workflows.
#>   https://wlandau.github.io/targets/,
#>   https://github.com/wlandau/targets.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {targets: Dynamic Function-Oriented 'Make'-Like Declarative Workflows},
#>     author = {William Michael Landau},
#>     note = {https://wlandau.github.io/targets/, https://github.com/wlandau/targets},
#>   }