% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unsupervised-hclust.R
\name{tidy_cutree}
\alias{tidy_cutree}
\title{Cut Hierarchical Clustering Tree}
\usage{
tidy_cutree(hclust_obj, k = NULL, h = NULL)
}
\arguments{
\item{hclust_obj}{A tidy_hclust object or hclust object}

\item{k}{Number of clusters (optional)}

\item{h}{Height at which to cut (optional)}
}
\value{
A tibble with columns \code{.obs_id} (observation identifier) and
\code{cluster} (integer cluster assignment).
}
\description{
Cut dendrogram to obtain cluster assignments
}
\examples{
\donttest{
hc <- tidy_hclust(USArrests, method = "ward.D2")
clusters <- tidy_cutree(hc, k = 3)
}

}
