View source: R/potential_match.R
potential_match | R Documentation |
Given a vector, find potential matches for each item against another vector. Items can also be grouped to check only against items in the same grouping.
potential_match(vec1, group1=NULL, vec2, group2=NULL, fancy=FALSE, agrep_value=.3, adist_value=1)
vec1 |
character vector. |
group1 |
character vector, of the same length as |
vec2 |
character vector. |
group2 |
character vector, of the same length as |
fancy |
if |
agrep_value |
|
adist_value |
Maximum Levenshtein distance between strings allowed for results. Higher values allows for less similar strings to be returned as potential matches. Used when |
A data.table
. The first two columns are the group (if applicable) and original character strings matched from vec1
. Columns three through eight contain up to six potential matches for the group/string pair in columns one and two. Where fewer than six potential matches are found, the rightmost columns will contain NA
.
potential_match(vec1=c("abc", "pigglywiggly"), vec2=c("abc", "rtyert", "piggly"), fancy=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.