| match,Splits,Splits-method | R Documentation |
match() returns a vector of the positions of (first) matches of splits in
its first argument in its second.
%in% is a more intuitive interface as a binary operator, which returns
a logical vector indicating whether there is a match or not for each
split in its left operand.
## S4 method for signature 'Splits,Splits'
match(x, table, nomatch = NA_integer_, incomparables = NULL)
match(x, table, nomatch = NA_integer_, incomparables = NULL)
## S4 method for signature 'Splits,Splits'
x %in% table
FirstMatchingSplit(x, table, nomatch, return = c("x", "table", "both"))
x, table |
Splits objects |
nomatch |
Integer value that will be used in place of |
incomparables |
Ignored. (Included for consistency with generic.) |
return |
Which index to return: in |
match() returns an integer vector specifying the position in
table that matches each element in x, or nomatch if no match is found.
FirstMatchingSplit() returns an integer
(or length-2 integer if return = "both") specifying the first split in x
to have a match in table (return = "x"),
or the index of that match (return = "table").
nomatch (default 0) is returned in the absence of a match.
Corresponding base functions are documented in
match().
Other Splits operations:
LabelSplits(),
NSplits(),
NTip(),
PolarizeSplits(),
SplitFrequency(),
Splits,
SplitsInBinaryTree(),
TipLabels(),
TipsInSplits(),
xor()
splits1 <- as.Splits(BalancedTree(7))
splits2 <- as.Splits(PectinateTree(7))
match(splits1, splits2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.