Get access to all lessons in this course.
Package Development with R
- devtools and usethis
- Package names and authors
- Choose a license
- Setup git + GitHub
- Writing functions
- Adding functions to our package
- Using other packages
- Packages so good they get their own functions
- Organizing .R files
- roxygen2: In-Line Documentation for R
- Argument descriptions and examples
- Helper functions
- Joining documentation
- Unit tests for R
- Organizing tests
- R CMD Check
- Types of Test Files
- Test Coverage
Add data and files
- Store data and files
- Include data for tests and create RMarkdown templates
- Create other templates
- Launch and store Shiny apps
- Citations, ignoring files, and including add-ins
roxygen2: In-Line Documentation for R
This lesson is locked
This lesson is called roxygen2: In-Line Documentation for R, part of the Package Development with R course. This lesson is called roxygen2: In-Line Documentation for R, part of the Package Development with R course.
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
For this section of the course, you’ll need the materials in this GitHub repo. You can download or clone them. After you download or clone the materials from the GitHub repo for this section of the course, open the entire project by clicking 03_avalanchr.Rproj.
Open the NAMESPACE file. What do you see?
Let’s add documentation. Run use_roxygen_md()
Open r/themes.R. Insert a roxygen skeleton for theme_avalanche().
Change the title to “AVALANCHE ggplot2 themes”
Hit Enter/Return twice after the title. Make sure the new lines start with #’.
Add this text: “Minimalistic ggplot themes for use on AVALANCHE reports.”
Run document() or press Ctrl/Cmd + Shift + D.
Read the help page for your function with ?theme_avalanche.
Finally, look at the NAMESPACE file again. What changed?