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.

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



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 run penguins_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