TreeTools (version 0.1.3)

match.Splits: Match splits

Description

Equivalent of match for Splits objects.

Usage

match.Splits(x, table, nomatch = NA_integer_, incomparables = NULL)

Arguments

x, table

Object of class Splits.

nomatch

The value to be returned in the case where no match is found.

incomparables

A vector of values that cannot be matched. Any value in x matching a value in this vector is assigned the nomatch value. For historical reasons, FALSE is equivalent to NULL.

Value

An integer vector specifying the position in table that matches each element in x, or nomatch if no match is found.

See Also

Other Splits operations: NSplits, NTip, TipLabels, TipsInSplits, as.Splits, in.Splits

Examples

Run this code
# NOT RUN {
splits1 <- as.Splits(BalancedTree(7))
splits2 <- as.Splits(PectinateTree(7))

match.Splits(splits1, splits2)

# }

Run the code above in your browser using DataLab