Learn R Programming

msgtools (version 0.2.4)

get_message_distances: Compare message distance

Description

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

Usage

get_message_distances(pkg = ".")

Arguments

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

Value

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

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

See Also

get_messages, spell_check_msgs

Examples

Run this code
pkg <- dummy_pkg()

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

Run the code above in your browser using DataLab