countLeaf {TreeSummarizedExperiment} | R Documentation |
countLeaf
calculates the number of leaves on a phylo
tree.
countLeaf(tree)
tree |
A phylo object |
a numeric value
Ruizhu Huang
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))