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
Argument descriptions and examples
This lesson is locked
This lesson is called Argument descriptions and examples, part of the Package Development with R course. This lesson is called Argument descriptions and examples, 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.
Let’s keep working on the documentation for theme_avalanche():
Remove @param base_size and replace it with: @inheritParams
For @param …, add: Additional arguments passed to
For @return, add: a ggplot theme.
For @examples, add two line breaks (make sure the new lines have roxygen comments!. Add this code: ggplot2::qplot(iris$Sepal.Length) + theme_avalanche()
Rebuild the documentation and check the help page.