SplitsInBinaryTree()
is a convenience function to calculate the number of
splits in a fully-resolved (binary) tree with n leaves.
Usage
SplitsInBinaryTree(tree)
# S3 method for class 'list'
SplitsInBinaryTree(tree)
# S3 method for class 'multiPhylo'
SplitsInBinaryTree(tree)
# S3 method for class 'numeric'
SplitsInBinaryTree(tree)
# S3 method for class '`NULL`'
SplitsInBinaryTree(tree)
# Default S3 method
SplitsInBinaryTree(tree)
# S3 method for class 'Splits'
SplitsInBinaryTree(tree)
# S3 method for class 'phylo'
SplitsInBinaryTree(tree)
Value
SplitsInBinaryTree()
returns an integer vector detailing the number
of unique non-trivial splits in a binary tree with n leaves.
See also
Other tree properties:
ConsensusWithout()
,
MatchEdges()
,
NSplits()
,
NTip()
,
NodeNumbers()
,
PathLengths()
,
TipLabels()
,
TreeIsRooted()
Other Splits operations:
LabelSplits()
,
NSplits()
,
NTip()
,
PolarizeSplits()
,
SplitFrequency()
,
Splits
,
TipLabels()
,
TipsInSplits()
,
match.Splits
,
xor()
Examples
tree <- BalancedTree(8)
SplitsInBinaryTree(tree)
#> [1] 5
SplitsInBinaryTree(as.Splits(tree))
#> [1] 5
SplitsInBinaryTree(8)
#> [1] 5
SplitsInBinaryTree(list(tree, tree))
#> [1] 5 5