11. Helpers, Build Systems, Environments, and Packages
This week …
As projects grow, they need more structure. We look at some helpers that make day-to-day work easier (reprex, air, usethis), at making tables, and at the tools that keep a growing project in order: build systems like make and targets, reproducible package environments with renv, and R packages as a way to bundle functions and data.
Required Reading
- Hadley Wickham and Jennifer Bryan R Packages (Sebastopol, CA: O’Reilly, 2023), https://r-pkgs.org. Read the text online. Read the Introduction and The Whole Game, which builds a small package from start to finish.
- Will Landau “The {Targets} R Package User Manual,” 2022, https://books.ropensci.org/targets/. Read the manual online. Read the Walkthrough chapter.
- The
renvintroductory vignette.
Examples
This week’s example builds a small targets pipeline in a temporary directory, runs it, and then changes one step to show that targets rebuilds only what is out of date.