Learn R Programming

TreeTools (version 2.4.1)

Cherries: Count cherries in a tree

Description

Cherries() counts the number of vertices in a binary tree whose children are both leaves.

Usage

Cherries(tree, nTip)

# S3 method for phylo Cherries(tree, nTip = NTip(tree))

# S3 method for numeric Cherries(tree, nTip)

Value

Cherries() returns an integer specifying the number of nodes whose children are both leaves.

Equations for the number of cherries expected under uniform and Yule tree models are derived by McKenzie2000;textualTreeTools.

Arguments

tree

A binary tree, of class phylo; or a matrix corresponding to its edge matrix.

nTip

Number of leaves in tree.

References

See Also

Other tree properties: ConsensusWithout(), EdgeRatio(), LongBranch(), MatchEdges(), NSplits(), NTip(), NodeNumbers(), PathLengths(), SplitsInBinaryTree(), TipLabels(), TreeIsRooted(), Treeness()