About

These materials were adapted from a three-hour workshop on the drake package run in 2020 and 2021 through Washington State University’s CEREO. drake is the predecessor to the current targets package. The original workshop materials were roughly formatted for workshops styled after the Carpentries. The goal is to present these materials in a book format to enable ecologists to learn the basics of creating workflows with targets through a hands-on approach. This is a living document that may receive edits in the future.

The dataset for the examples in this document comes from the palmerpenguins package.

Topics

The chapters in this document will cover the following topics:

  1. Intro to workflow management: What is workflow management?
  2. Scripting philosophies: How do we often organize scripts without workflow management?
  3. Intro to targets: What is targets and what does it require of us?
  4. Pipeline structure: How are the files and code in a targets pipeline organized?
  5. Basics of functions: A quick overview of writing useful functions
  6. Basic organization: A guided example of how to start using targets with a new project
  7. Defining targets: Building the outline for the example targets pipeline
  8. Building the workflow around functions: Writing functions to carry out steps in the example pipeline
  9. Filling out the pipeline: How to link targets to functions in the example pipeline
  10. Creating an R Markdown report: Automating a summary of the example outputs
  11. Running and updating the pipeline: How to run the full pipeline, view its outputs, and make changes