Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 2.07 KB

README.md

File metadata and controls

32 lines (21 loc) · 2.07 KB

Get started with targets in 4 minutes

cloud

The targets R package is a pipeline tool for reproducible computation in statistics and data science. This short example is the one from the 4-minute video on getting started with targets. It also comes up in the walkthrough and functions chapters of the user manual.

Try it out

Visit https://rstudio.cloud/project/3946303 to try out the code in a web browser. No download or installation required.

Files

  • data.csv: the airquality dataset from the datasets package.
  • R/functions.R: custom R functions you define for the analysis.
  • _targets.R: a special script to configure and define the pipeline.

Usage

  1. library(targets) to load the package.
  2. tar_manifest() and tar_visnetwork() to check the pipeline for correctness.
  3. tar_make() or similar to run the pipeline.
  4. tar_read() to read target output.

Changes

  • Rerun tar_make() after changing nothing else. All targets will be skipped.
  • Change the contents of data.csv and then rerun tar_make(). All the targets will rerun.
  • Change only the plot_model() function in R/function.R and then rerun tar_make(). Only the plot target will rerun, and the rest will be skipped.