Skip to contents

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

Usage

Cherries(tree, nTip)

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

# S3 method for class 'numeric'
Cherries(tree, nTip)

Arguments

tree

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

nTip

Number of leaves in tree.

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 McKenzie and Steel (2000) .

References

McKenzie A, Steel M (2000). “Distributions of Cherries for Two Models of Trees.” Mathematical Biosciences, 164(1), 81–92. doi:10.1016/S0025-5564(99)00060-7 .