% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/heatmap.R
\name{cluster_within_group2}
\alias{cluster_within_group2}
\title{Cluster within group}
\usage{
cluster_within_group2(mat, factor)
}
\arguments{
\item{mat}{A matrix of data}

\item{factor}{A factor}
}
\value{
A dendrogram with ordered leaves
}
\description{
Cluster within group
}
\examples{
mat <- matrix(rnorm(100), 10, 10)
factor <- factor(rep(1:2, each = 5))
dend <- cluster_within_group2(mat, factor)
dend
plot(dend)
}
