powered by
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.
string_suggestions(strings, search_data, max_dist = 2, ignore.case = TRUE)
character vector; value(s) to find
character vector; phrase(s) where values may exist
numeric; edit distance to use for partial matches. The default value is 2.
logical; indicates if spelling case matters, defaulting to ‘TRUE’
data.frame with two columns, ‘suggestion’ and ‘match’
# NOT RUN { string_suggestions('penicillin', 'penicillan, penicillin, or penicilin?') # }
Run the code above in your browser using DataLab