A worked targets example for ecologists
2023-03-30
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:
- Intro to workflow management: What is workflow management?
- Scripting philosophies: How do we often organize scripts without workflow management?
- Intro to
targets: What istargetsand what does it require of us? - Pipeline structure: How are the files and code in a
targetspipeline organized? - Basics of functions: A quick overview of writing useful functions
- Basic organization: A guided example of how to start using
targetswith a new project - Defining targets: Building the outline for the example
targetspipeline - Building the workflow around functions: Writing functions to carry out steps in the example pipeline
- Filling out the pipeline: How to link targets to functions in the example pipeline
- Creating an R Markdown report: Automating a summary of the example outputs
- Running and updating the pipeline: How to run the full pipeline, view its outputs, and make changes