16.1 roxygen2 basics
16.1.1 Documentation workflow
Four main steps:
- Opening move is add roxygen comments above your functions in your
R/.R
files - Run
devtools::document()
- Preview documentation with
?function
- Rinse and repeat
16.1.3 Key markdown features
- Backticks for inline code
- Square brackets for auto-linked function
#' It's obvious that `thisfunction()` is better than [otherpkg::otherfunction()]
#' or even our own [olderfunction()].
- Vignettes
vignette("rd-formatting", package = "roxygen2")
vignette("reuse", package = "roxygen2")
vignette("linking", package = "pkgdown")
- Lists