MatchStrings {TreeTools} | R Documentation |
Check for mismatch between character vectors
Description
Checks that entries in one character vector occur in another, suggesting corrections for mismatched elements.
Usage
MatchStrings(x, table, Fail = stop, max.distance = 0.5, ...)
Arguments
x , table |
Character vectors, in which all elements of |
Fail |
Function to call if a mismatch is found. |
max.distance , ... |
Arguments to |
Value
MatchStrings()
returns the elements of x
that occur in table
.
Author(s)
Martin R. Smith (martin.smith@durham.ac.uk)
See Also
Other string parsing functions:
EndSentence()
,
MorphoBankDecode()
,
RightmostCharacter()
,
Unquote()
Examples
tree <- BalancedTree(8)
MatchStrings(c("t1", "tip2", "t3"), TipLabels(tree), Fail = message)
[Package TreeTools version 1.15.0 Index]