% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree_countLeaf.R
\name{countLeaf}
\alias{countLeaf}
\title{count the number of leaf nodes}
\usage{
countLeaf(tree)
}
\arguments{
\item{tree}{A phylo object}
}
\value{
a numeric value
}
\description{
\code{countLeaf} calculates the number of leaves on a \code{phylo} tree.
}
\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))

}
\author{
Ruizhu Huang
}
