cluster_between_groups: Cluster only between Groups

View source: R/grid.dendrogram.R

cluster_between_groupsR Documentation

Cluster only between Groups

Description

Cluster only between Groups

Usage

cluster_between_groups(mat, factor)

Arguments

mat

A matrix where clustering is applied on columns.

factor

A categorical vector.

Details

The clustering is only applied between groups and inside a group, the order is unchanged.

Value

A dendrogram object.

Examples

m = matrix(rnorm(120), nc = 12)
colnames(m) = letters[1:12]
fa = rep(c("a", "b", "c"), times = c(2, 4, 6))
dend = cluster_between_groups(m, fa)
grid.dendrogram(dend, test = TRUE)

jokergoo/ComplexHeatmap documentation built on Nov. 17, 2023, 11:27 a.m.