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

}
\author{
Ruizhu Huang
}
