This is a demo of a simple targets workflow using the Palmer Penguins dataset (Horst, Hill, and Gorman 2020). This workflow supports my blog post on how to use a targets workflow.
We implement a targets workflow with the following objects:
fileloads the raw csv datadatareads in the csv filexvar,yvar, andgroupvarspecifies which variables are of interest in the analysistableprovides a table of statistical summary for each variable of interestmodelfits a simple linear modelplotgenerates a scatter plot of the data with a line of the model running through it.
Supporting files not usually part of the targets workflow:
-
/scripts/initialise.Rshows you how to set up and how the csv files were generated. -
/scripts/interim.Rshows you …
Horst, Allison Marie, Alison Presmanes Hill, and Kristen B Gorman. 2020. Palmerpenguins: Palmer Archipelago (Antarctica) Penguin Data. https://doi.org/10.5281/zenodo.3960218.