string_suggestions: Find Strings and Suggest Misspellings

View source: R/string_suggestions.R

string_suggestionsR Documentation

Find Strings and Suggest Misspellings

Description

This function searches for text within one or more phrases, and looks for partial matches. An exact match of the text should be found in order for a suggestion to made.

Usage

string_suggestions(strings, search_data, max_dist = 2, ignore.case = TRUE)

Arguments

strings

character vector; value(s) to find

search_data

character vector; phrase(s) where values may exist

max_dist

numeric; edit distance to use for partial matches. The default value is 2.

ignore.case

logical; indicates if spelling case matters, defaulting to ‘TRUE’

Value

data.frame with two columns, ‘suggestion’ and ‘match’

Examples

string_suggestions('penicillin', 'penicillan, penicillin, or penicilin?')

medExtractR documentation built on June 7, 2022, 1:08 a.m.