Write R package documentation as comments next to your functions
open sourceMITfree
roxygen2 generates an R package's documentation from specially formatted comments written next to the code they describe. Running roxygenise() (or devtools::document() from devtools) turns those comments into the .Rd files in man/, the NAMESPACE file and, when needed, the Collate field in DESCRIPTION. It documents functions, datasets and packages, S3, S4, R6 and S7 classes, supports Markdown in comments, reuses and inherits documentation between topics, and can be extended with new tags.
Problems it solves
- keep my R package's help pages in sync with the code without editing .Rd files by hand
- generate the NAMESPACE imports and exports for my R package automatically
- document S4 or R6 classes in an R package
Features
- Generates .Rd help files from comments next to the code
- Writes the NAMESPACE file's imports and exports
- Documents functions, datasets, packages and S3, S4, R6 and S7 classes
- Markdown in documentation comments
- Reuses and inherits documentation between topics
- Extensible with new tags
