Generate R package documentation and NAMESPACE files from inline R comments.
roxygen2 is an R package that generates documentation for R packages from inline comments in source code. It automates the creation of Rd files, NAMESPACE, and Collate fields, solving the problem of maintaining manual documentation that often falls out of sync with code.
R package developers and maintainers who need to produce and manage documentation efficiently, particularly those working on CRAN or Bioconductor packages.
Developers choose roxygen2 because it integrates documentation directly into the development workflow, reduces boilerplate, ensures consistency, and is widely adopted in the R community as the standard tool for package documentation.
Generate R package documentation from inline R comments
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Keeps documentation comments right next to function definitions, as shown in the str_length example, making updates easy and reducing context switching.
Generates Rd files, NAMESPACE, and updates the Collate field automatically, eliminating manual writing and syncing errors mentioned in the README.
Allows R Markdown syntax in comments for rich text formatting, enhancing help file readability without learning Rd syntax, per vignette('rd-formatting').
Provides tags like @inheritParams to reuse documentation across functions, reducing duplication as detailed in vignette('reuse').
Requires memorizing specific roxygen2 tags and syntax, which can be complex for new users, as indicated by the need to read multiple vignettes for mastery.
Tied exclusively to R package development workflow, so it cannot be used for documentation in other programming languages or mixed projects.
Inline documentation can bloat source code files, potentially making them harder to read and navigate, especially in large packages.