GetCloseMatches: Matches of character strings

Description Usage Arguments Details References Examples

Description

Matches of character strings

Usage

1
2
GetCloseMatches(string = NULL, sequence_strings = NULL, n = 3L,
  cutoff = 0.6)

Arguments

string

a character string.

sequence_strings

a vector of character strings.

n

an integer value specifying the maximum number of close matches to return; n must be greater than 0.

cutoff

a float number in the range [0, 1], sequence_strings that don't score at least that similar to string are ignored.

Details

Returns a list of the best "good enough" matches. string is a sequence for which close matches are desired (typically a string), and sequence_strings is a list of sequences against which to match string (typically a list of strings).

References

https://www.npmjs.com/package/difflib, http://stackoverflow.com/questions/10383044/fuzzy-string-comparison

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
if (check_availability()) {


  library(fuzzywuzzyR)

  vec = c('Frodo Baggins', 'Tom Sawyer', 'Bilbo Baggin')

  str1 = 'Fra Bagg'

  GetCloseMatches(string = str1, sequence_strings = vec, n = 2L, cutoff = 0.6)


}

fuzzywuzzyR documentation built on May 2, 2019, 8:53 a.m.