Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Extract.HeatmapList

Subset a HeatmapList object


Description

Subset a HeatmapList object

Usage

## S3 method for class 'HeatmapList'
x[i, j]

Arguments

x

A HeatmapList-class object

i

row indices

j

column indices

Details

If the heatmap list is horizontal, i is the row indices and j corresponds to heatmap names and single annotation names. and if the heatlist is vertical, i corresponds to heatmap/annotation names and j is the column indices.

Examples

ht_list = Heatmap(matrix(rnorm(100), 10), name = "rnorm") +
  rowAnnotation(foo = 1:10, bar = anno_points(10:1)) + 
  Heatmap(matrix(runif(100), 10), name = "runif")
summary(ht_list[1:5, ])
summary(ht_list[1:5, 1])
summary(ht_list[1:5, "rnorm"])
summary(ht_list[1:5, c("rnorm", "foo")])

ht_list = Heatmap(matrix(rnorm(100), 10), name = "rnorm") %v%
  columnAnnotation(foo = 1:10, bar = anno_points(10:1)) %v%
  Heatmap(matrix(runif(100), 10), name = "runif")
summary(ht_list[, 1:5])
summary(ht_list[1, 1:5])
summary(ht_list["rnorm", 1:5])
summary(ht_list[c("rnorm", "foo"), 1:5])

ComplexHeatmap

Make Complex Heatmaps

v2.6.2
MIT + file LICENSE
Authors
Zuguang Gu
Initial release
2020-11-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.