Instructor Notes
General notes
The examples gradually build up to a full analysis
of the Palmer
Penguins dataset. However, there are a few places where completely
different code is demonstrated to explain certain concepts. Since a
given targets
project can only have one
_targets.R
file, this means the participants may have to
delete their existing _targets.R
file and write a new one
to follow along with the examples. This may cause frustration if they
can’t keep a record of what they have done so far. One solution would be
to save the old _targets.R
file as
_targets_old.R
or similar, then rename it when it should be
run again.
Optional episodes:
The “Function” episode is an optional episode and will depend on the learners coming to your workshop. We would recommend having a show of hands (or stickies) who has experience with functions, and if you have learners who do not, run this episode.
targets relies so much on functions we believe it is worth spending a little time on if you have learners inexperienced with them, they will quickly fall behind and not be empowered to use targets at the end of the workshop if they don’t get a short introduction.
Introduction
Instructor Note
Episode summary: Introduce the idea of reproducibility and why / who
would want to use targets
First targets Workflow
Instructor Note
Episode summary: First chance to get hands dirty by writing a very simple workflow
A Brief Introduction to Functions
Instructor Note
Episode summary: A very brief introduction to functions, when you have learners who have no experience with them.
Loading Workflow Objects
Instructor Note
Episode summary: Show how to get at the objects that we built
Instructor Note
- To reinforce the concept of
targets
running in a separate R session, you may want to pretend trying to runpenguins_data
, then feigning surprise when it doesn’t work and using it as a teaching moment (errors are pedagogy!).
The Workflow Lifecycle
Instructor Note
Episode summary: Demonstrate typical cycle of running
targets
: make, inspect, adjust, make…
Best Practices for targets Project Organization
Instructor Note
Episode summary: Demonstrate best-practices for project organization
Managing Packages
Instructor Note
Episode summary: Show how to load packages and maintain package versions
Working with External Files
Instructor Note
Episode summary: Show how to read and write external files
Branching
Instructor Note
Episode summary: Show how to use branching
Parallel Processing
Instructor Note
Episode summary: Show how to use parallel processing
Reproducible Reports with Quarto
Instructor Note
Episode summary: Show how to write reports with Quarto