View source: R/tree_countLeaf.R
countLeaf | 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.