match()
returns a vector of the positions of (first) matches of trees 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
tree in its left operand.
# S4 method for phylo,phylo
match(x, table, nomatch = NA_integer_, incomparables = NULL)# S4 method for multiPhylo,phylo
match(x, table, nomatch = NA_integer_, incomparables = NULL)
# S4 method for phylo,multiPhylo
match(x, table, nomatch = NA_integer_, incomparables = NULL)
# S4 method for multiPhylo,multiPhylo
match(x, table, nomatch = NA_integer_, incomparables = NULL)
# S4 method for multiPhylo,multiPhylo
%in%(x, table)
# S4 method for multiPhylo,phylo
%in%(x, table)
# S4 method for phylo,multiPhylo
%in%(x, table)
# S4 method for phylo,phylo
%in%(x, table)
match()
returns an integer vector specifying the position in
table
that matches each element in x
, or nomatch
if no match is found.
Object of class phylo
or multiPhylo
.
Integer value that will be used in place of NA
in the case
where no match is found.
Ignored. (Included for consistency with generic.)
Corresponding base functions are documented in
match()
.
Other utility functions:
ClusterTable
,
ClusterTable-methods
,
Hamming()
,
MSTEdges()
,
SampleOne()
,
TipTimedTree()
,
UnshiftTree()
,
as.multiPhylo()
,
sapply64()
,
sort.multiPhylo()
tree1 <- BalancedTree(7)
trees <- c(PectinateTree(7), BalancedTree(7))
match(tree1, trees)
Run the code above in your browser using DataLab