selectPosition: Select a position in the heatmap

Description Usage Arguments Value Author(s) See Also Examples

View source: R/interactive.R

Description

Select a position in the heatmap

Usage

1
2
selectPosition(ht_list, pos = NULL, mark = TRUE, verbose = TRUE,
    ht_pos = NULL)

Arguments

ht_list

A HeatmapList-class object returned by draw,Heatmap-method or draw,HeatmapList-method.

mark

Whether mark the selected position as a point.

pos

If the value is NULL, it can be selected by click on the heatmap (of cource, the heatmap should be on the interactive graphic device). If it is set, it must be a unit object with length two which corresponds to the x and y position of the point.

verbose

Whether to print messages.

ht_pos

A value returned by ht_pos_on_device.

Value

A DataFrame object with row index and column index corresponding to the selected position.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

See Also

The code for this shiny app is at https://github.com/jokergoo/ComplexHeatmap/blob/master/inst/app/app.R

Examples

1
2
3
4
5
6
7
8
9
if(interactive()) {
	m = matrix(rnorm(100), 10)
	rownames(m) = 1:10
	colnames(m) = 1:10

ht = Heatmap(m)
	ht = draw(ht)
selectPosition(ht)
}

ComplexHeatmap documentation built on Nov. 14, 2020, 2:01 a.m.