The function make sure that the documentation is up to date. Rules:
You must use roxygen2 to document the functions.
If you use a
README.Rmd, it should be rendered.
You need at least a
Don't use a
NEWS.Rmd but a
NEWS.md must contain an entry for the current package version.
check_documentation(x = ".", quiet = FALSE)
Checklist object or a path to the source code.
Whether to print check output during checking.
The function generates the help files from the roxygen2 tag in the R code.
Then it checks whether any of the help files changed.
We use the same principle with the
If any file changed, the documentation does not match the code.
check_documentation() returns an error.
A side effect of running
check_documentation() locally, is that it
generates all the documentation.
So the only thing left for you to do, is to commit these changes.
Pro tip: make sure RStudio renders the roxygen2 tags whenever you install and
restart the package.
We describe this in
vignette("getting_started") under "Prepare local
# package_name version * Description of something that changed. * Lines should not exceed 80 characters. Start a new line with two space to continue an item. * Add a single blank line before and after each header. ## Second level heading * You can use second level headings when you want to add more structure.