Automatically spell-check package description, documentation, and vignettes.
spell_check_package(pkg = ".", vignettes = TRUE, use_wordlist = TRUE)spell_check_setup(pkg = ".", vignettes = TRUE, lang = "en-US",
error = FALSE)
path to package root directory containing the DESCRIPTION
file
also check all rmd
and rnw
files in the pkg vignettes
folder
ignore words in the package WORDLIST file
set Language
field in DESCRIPTION
e.g. "en-US"
or "en-GB"
.
should CMD check
fail if spelling errors are found?
Default only prints results.
Parses and checks R manual pages, rmd/rnw vignettes, and text fields in the
package DESCRIPTION
file.
The preferred spelling language (typically en-GB
or en-US
) should be specified
in the Language
field from your package DESCRIPTION
. To whitelist custom words
use the package WORDLIST file which will be added to the dictionary
when spell checking. See update_wordlist to automatically populate and update this
file.
The spell_check_setup function adds a unit test to your package which automatically
runs a spell check on documentation and vignettes during R CMD check
if the environment
variable NOT_CRAN
is set to TRUE
. By default this unit test never fails; it merely
prints potential spelling errors to the console.
Hunspell includes dictionaries for en_US
and en_GB
by default. Other languages
require installation of a custom dictionary, see hunspell for details.
Other spelling: spell_check_files
,
wordlist