powered by
Cluster within group
cluster_within_group2(mat, factor)
A dendrogram with ordered leaves
A matrix of data
A factor
mat <- matrix(rnorm(100), 10, 10) factor <- factor(rep(1:2, each = 5)) dend <- cluster_within_group2(mat, factor) dend plot(dend)
Run the code above in your browser using DataLab