cluster_between_groups {ComplexHeatmap} | R 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)

[Package ComplexHeatmap version 2.10.0 Index]