Chapter 5 The package within
Purpose
To walk through the development of a small toy package, with an emphasis on the package’s R code and how it differs from R code in a script.
Roadmap:
- Data analysis script
- Isolate and extract the reusable data and logic from the script
- Put code into an R package
- Use package in a newly simplified script.
This chapter purposefully makes mistakes along the way, in order to highlight special considerations for the R code inside a package.
Section headers incorporate the NATO phonetic alphabet.