spelling (version 1.0)

spell_check_package: Package Spell Checking

Description

Automatically spell-check package description, documentation, and vignettes.

Usage

spell_check_package(pkg = ".", vignettes = TRUE, lang = "en_GB",
  use_wordlist = TRUE)

spell_check_setup(pkg = ".", vignettes = TRUE, lang = "en_GB", error = FALSE)

Arguments

pkg

path to package root directory containing the DESCRIPTION file

vignettes

also check all rmd and rnw files in the pkg vignettes folder

lang

dictionary string for hunspell, usually either "en_US" or "en_GB".

use_wordlist

ignore words in the package WORDLIST file

error

make R CMD check fail when spelling errors are found. Default behaviour only prints spelling errors to the console at the end of CMD check.

Details

Parse and spell check R package manual pages, rmd/rnw vignettes, and text fields in the DESCRIPTION file. Use the WORDLIST file to allow custom words in your package, which will be added to the dictionary when spell checking.

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. 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.

See Also

Other spelling: spell_check_files, wordlist