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.