spell_check_msgs: Spell check diagnostic messages

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/spelling.R

Description

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

Usage

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

Details

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

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.

Author(s)

Thomas J. Leeper

See Also

get_messages, get_message_distances

Examples

1
2
3
4
5
6
## Not run: 
  # Not run since it takes too long
  pkg <- extract_example_pkg()
  spell_check_msgs(pkg)

## End(Not run)

msgtools documentation built on May 30, 2017, 5:12 a.m.