Instructor Notes

This is a placeholder file. Please add content here.

Introduction


Accessing packages


Instructor Note

To most learners of this lesson, installation instructions are common knowledge. This part of the lesson may therefore be experienced as somewhat slow, and we encourage you to be sensitive to this. We have chosen to be comprehensive in this episode, and include installation instructions from CRAN alongside those from other platforms. This provides context to some new functionality; functionality that is quite essential when distributing a first package (which is easiest done through e.g. GitHub).



Instructor Note

The local installation will be very easy to do once everyone has their first package set up. It is advised to wait with showing this workflow until this stage in the lesson: the chapter Getting Started.



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.