get_message_distances: Compare message distance

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

View source: R/get_message_distances.R

Description

Compare the string distance of messages to check for near-duplicates

Usage

1

Arguments

pkg

The directory of an R package to extract diagnostic messages from. Path is passed to as.package.

Details

Compares the generalized Levenshtein (edit) distance between pairs of messages using adist, returning the data frame of messages from get_messages with additional columns corresponding to the pairwise distance

Value

A “tibble” (data frame) containing messages, pluralized messages, and the file location of each message.

Author(s)

Thomas J. Leeper

See Also

get_messages, spell_check_msgs

Examples

1
2
3
4
pkg <- dummy_pkg()

# get message distances
dist <- get_message_distances(pkg = pkg)

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