Learn R Programming

msgtools (version 0.2.4)

spell_check_msgs: Spell check diagnostic messages

Description

Extracts diagnostic messages from a package and checks them for spelling errors.

Usage

spell_check_msgs(dict = "en_US", pkg = ".")

Arguments

dict
A dictionary object.
pkg
The directory of an R package to extract diagnostic messages from. Path is passed to as.package.

Value

A data frame containing each message with a potentially misspelled word, the misspelled word, and the source code file in which the message is located, and (for each word) a list of suggested corrections. If no words are misspelled, a data frame with zero rows.

Details

Extracts diagnostic messages from a package and processes them using hunspell to check for possible spelling mistakes.

See Also

get_messages, get_message_distances

Examples

Run this code
## Not run: 
#   # Not run since it takes too long
#   pkg <- extract_example_pkg()
#   spell_check_msgs(pkg)
# ## End(Not run)

Run the code above in your browser using DataLab