Description Usage Arguments Details Value Author(s) See Also Examples
Match and reinterpret a vector in terms of a second vector, essentially using the second vector as a key to interpret the first.
1 | fuzzyMatches(x, y, ...)
|
x |
vector, the values to be matched. |
y |
vector, the values to be matched against. |
... |
Arguments to be passed to methods (see
|
This function employs multiple stages of matching between two vectors. First, the values in x
are matched against y
to find any exact matches. Next, numerical values in x
are used to retrieve the corresponding positions in y
. All unmatched values may be retained or dropped (depending on the value of keep
), and a list of unique values is returned. Note that a value of match.all
in x
will be interpreted as a match for ALL values in y
, and therefore replaced with the contents of y
.
Returns a vector of unique values in x
, that match values in y
according to the parameters described above.
Reid F. Thompson (rthompso@aecom.yu.edu)
1 2 3 4 5 6 | a <- c(1, "four", "missing")
b <- c("one", "two", "three", "four")
fuzzyMatches(a, b)
fuzzyMatches(a, b, strict=FALSE)
fuzzyMatches(a, b, strict=FALSE, alias=FALSE)
fuzzyMatches(a, b, strict=FALSE, keep=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.