View source: R/check_documentation.R
check_documentation | R Documentation |
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 README.md
.
Don't use a NEWS.Rmd
but a NEWS.md
.
NEWS.md
must contain an entry for the current package version.
check_documentation(x = ".", quiet = FALSE)
x |
Either a |
quiet |
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 README.Rmd
.
If any file changed, the documentation does not match the code.
Hence 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
setup".
NEWS.md
# 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. # `package_name` version * Adding back ticks around the package name is allowed.
Other package:
check_codemeta()
,
check_cran()
,
check_description()
,
check_environment()
,
check_license()
,
check_package()
,
tidy_desc()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.