⚠️There's a newer version (1.7.1) of this package.Take me there.

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

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.

Copy Link

Version

Monthly Downloads

13,192

Version

0.0.0.9000

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

January 1st, 1970

Functions in targets (0.0.0.9000)

reexports

Objects exported from other packages
rstudio_addin_tar_outdated

rstudio_addin_tar_load

RStudio addin to call tar_load() on the symbol at the cursor.
rstudio_addin_tar_progress

RStudio addin to print tail(tar_progress()).
tar_group

Group a data frame to iterate over subsets of rows.
tar_deduplicate

Deduplicate meta and progress databases.
tar_make_clustermq

Run a pipeline of targets in parallel with persistent clustermq workers.
tar_make

Run a pipeline of targets.
tar_invalidate

Invalidate targets and global objects in the metadata.
tar_cue

Declare the rules that cue a target.
tar_load

Load the values of targets.
tar_load_raw

Load the values of targets (raw version).
tar_read_raw

Read a target's value from storage (raw version)
tar_script

Write a _targets.R script to the current working directory.
tar_workspace

Load a saved workspace and seed for debugging.
tar_deps_raw

Code dependencies (raw version)
tar_pipeline

Declare a pipeline of targets.
tar_meta

Read a project's metadata.
tar_progress

Read the target progress of the latest run of the pipeline.
tar_name

Get the name of the target currently running.
tar_destroy

Destroy a section or all of the _targets/ data store in the current working directory
tar_option_set

Set target options.
tar_delete

Delete target return values.
tar_option_reset

Reset all target options.
tar_target_raw

Define a target using unrefined names and language objects.
tar_validate

Validate a pipeline of targets.
tar_visnetwork

Visualize an abridged fast dependency graph.
tar_deps

Code dependencies
rstudio_addin_tar_target

RStudio addin to insert "tar_target()" at the cursor.
tar_network

Return the vertices and edges of a pipeline dependency graph.
tar_undebug

Remove debugging files.
tar_prune

Remove targets that are no longer part of the pipeline.
tar_option_get

Get a target option.
target_run_remote

Internal function to run a target on a remote worker.
tar_read

Read a target's value from storage.
tar_sitrep

Show the cue-by-cue status of each target.
tar_dir

Execute code in a temporary directory.
tar_glimpse

Visualize an abridged fast dependency graph.
tar_target

Declare a target.
tar_path

Get the file path of a target's stored value.
tar_make_future

Run a pipeline of targets in parallel with transient future workers.
tar_manifest

Produce a data frame of information about your targets.
tar_outdated

Check which targets are outdated.
targets-package

targets: Dynamic Function-Oriented Make-Like Declarative Pipelines for R
tar_cancel

Cancel a target mid-build under a custom condition.
rstudio_addin_tar_make_bg

rstudio_addin_tar_read

RStudio addin to call tar_read() on the symbol at the cursor.
rstudio_addin_tar_visnetwork

rstudio_addin_tar_glimpse

tar_edit

Open _targets.R for editing.
tar_renv

Set up package dependencies for compatibility with renv