cyberneticlibrary

Regenerate package documentation

doccommandsetup L10
matthiaskloft/rctbayespower
What it does

Regenerate R package documentation from roxygen comments

Best for

R package maintainers avoiding manual .Rd editing and ensuring docs stay in sync with code.

Inputs
  • · Roxygen comments in .R source files
Outputs
  • · man/*.Rd files regenerated
  • · README (optional rebuild from README.Rmd)
  • · Warning log for missing/invalid annotations
Requires
  • · R devtools package
  • · roxygen2
Preconditions
  • · devtools and roxygen2 installed
  • · Source .R files have roxygen comments (@param, @return, etc.)
Failure modes
  • · Stale/incorrect man/*.Rd files if roxygen comments not updated first
  • · Duplicate/orphaned @param entries — script reports but user must fix source
  • · Unknown tags in comments — roxygen2 errors (user must correct syntax)
Trust signals
  • · Enforces single source of truth (roxygen comments, not .Rd files)
  • · Iterative validation (re-run until warnings clear)
  • · Structured warning table for common issues