selectArea {InteractiveComplexHeatmap} | R Documentation |
Select an area in the heatmap
selectArea(ht_list = get_last_ht(), pos1 = NULL, pos2 = NULL, mark = TRUE, verbose = TRUE, ht_pos = NULL, include_annotation = FALSE, calibrate = TRUE)
ht_list |
A |
mark |
Whether to mark the selected area as a rectangle. |
pos1 |
If the value is |
pos2 |
Another point as |
verbose |
Whether to print messages. |
ht_pos |
A value returned by |
include_annotation |
Internally used. |
calibrate |
Internally used. Mainly works for Rstudio desktop IDE. |
The regions can be selected interactively or selected manually by setting pos1
and pos2
.
A DataFrame
object with row indices and column indices corresponding to the selected region.
if(dev.interactive()) { m = matrix(rnorm(100), 10) rownames(m) = 1:10 colnames(m) = 1:10 ht = Heatmap(m) ht = draw(ht) selectArea(ht) set.seed(123) ht = Heatmap(m, row_km = 2, column_km = 2) ht = draw(ht) selectArea(ht) }