% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distance.R
\name{taxo_cluster}
\alias{taxo_cluster}
\title{Cluster taxa by taxonomic distance}
\usage{
taxo_cluster(taxa, method = "average", ...)
}
\arguments{
\item{taxa}{A character vector of taxon names, or a \code{dist} object from
\code{\link[=distance_matrix]{distance_matrix()}}.}

\item{method}{Clustering method passed to \code{\link[stats:hclust]{stats::hclust()}}. Default
\code{"average"} (UPGMA), which works well with taxonomic distances.}

\item{...}{Additional arguments passed to \code{\link[=distance_matrix]{distance_matrix()}} (e.g.
\code{verbose}, \code{progress}).}
}
\value{
An object of class \code{"taxodist_cluster"} — a list with:
\describe{
\item{\code{hclust}}{The \code{\link[stats:hclust]{stats::hclust()}} result.}
\item{\code{dist}}{The underlying distance matrix.}
}
}
\description{
Computes pairwise taxonomic distances and performs hierarchical clustering.
}
\examples{
\donttest{
taxa <- c("Tyrannosaurus", "Velociraptor", "Triceratops", "Brachiosaurus")
cl <- taxo_cluster(taxa)
plot(cl)
}
}
\seealso{
\code{\link[=taxo_ordinate]{taxo_ordinate()}}, \code{\link[=distance_matrix]{distance_matrix()}}
}
