Instructor Notes
This workshop introduces the process of creating a package, where each step in that process is dependent on the previous step. If a learner gets behind, or one of the steps doesn’t work for them, they may not be able to catch up with the rest of the class. To help ensure that all learners are able to work through the whole process, we provide solution files.
Introduction
Accessing packages
Getting started
Writing our own functions
Licenses
Testing
Managing dependencies
Documenting your package
Data
Instructor Note
The diagram was created with mermaid. This is the original code:
flowchart LR
id1(Does the user need access?) --Yes--> id6(Store it in data/)
id3(Is the data in .Rda format?)--Yes--> id1
id1 --No, but tests do--> id5(Store it in tests/)
id1 --No, but functions do--> id4(Store it in R/sysdata.Rda*)
id3 --No--> id8(But can it be?)
id8 --Yes, with some work --> id9(Document the process in data-raw/**)
id8 --No, it shouldn't--> id7(Store it in inst/extdata)
Vignettes
Instructor Note
In the solution above, the line library(mysterycoffee)
is commented out. This is a technical choice: due to the Carpentries
Lesson Template being written in Rmarkdown, this line caused the CI to
attempt to install mysterycoffee
… which of course does not
exist. Please make sure to point out when sharing this solution that the
line must be uncommented in a functional vignette.