countLeaf {TreeSummarizedExperiment}R Documentation

count the number of leaf nodes

Description

countLeaf calculates the number of leaves on a phylo tree.

Usage

countLeaf(tree)

Arguments

tree

A phylo object

Value

a numeric value

Author(s)

Ruizhu Huang

Examples

library(ggtree)

data(tinyTree)

ggtree(tinyTree, branch.length = 'none') +
geom_text2(aes(label = label), hjust = -0.3) +
geom_text2(aes(label = node), vjust = -0.8,
hjust = -0.3, color = 'blue')


(n <- countLeaf(tinyTree))


[Package TreeSummarizedExperiment version 2.0.3 Index]