% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots-dendro.r
\name{ClusterCols}
\alias{ClusterCols}
\title{Helper that colours dendrogram leaves by cluster membership}
\usage{
ClusterCols(x, Data, nrclusters = NULL, cols = NULL, colorComps = NULL)
}
\arguments{
\item{x}{A node of a dendrogram (passed by \code{dendrapply}).}

\item{Data}{The clustering result (an \code{agnes}/\code{hclust} object) used to determine cluster membership.}

\item{nrclusters}{Optional. The number of clusters to cut the dendrogram in. Default is NULL.}

\item{cols}{The colours for the clusters if nrclusters is specified. Default is NULL.}

\item{colorComps}{Optional. A character vector of objects to highlight in red. Default is NULL.}
}
\value{
The dendrogram node \code{x} with coloured \code{nodePar} and \code{edgePar} attributes.
}
\description{
Internal helper applied via \code{dendrapply} that colours the
leaves and edges of a dendrogram according to the cluster a leaf belongs to,
or to a specific selection of objects. Used by \code{ClusterPlot}.
}
