| spell_check_package {spelling} | R Documentation |
Package Spell Checking
Description
Automatically spell-check package description, documentation, and vignettes.
Usage
spell_check_package(pkg = ".", vignettes = TRUE, use_wordlist = TRUE)
spell_check_setup(pkg = ".", vignettes = TRUE, lang = "en-US", error = FALSE)
Arguments
pkg |
path to package root directory containing the |
vignettes |
check all |
use_wordlist |
ignore words in the package WORDLIST file |
lang |
set |
error |
should |
Details
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 allow 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. If not already done,
the spell_check_setup function will add spelling as a Suggests dependency,
and a Language field to DESCRIPTION.
Hunspell includes dictionaries for en_US and en_GB by default. Other languages
require installation of a custom dictionary, see hunspell for details.
See Also
Other spelling:
spell_check_files(),
wordlist