setup_tooltip_options: Tooltip Options

Description Usage Arguments Value Examples

View source: R/main_heatmap.R

Description

This function setups tooltip options for heatmap components of iheatmapr complex heatmaps.

Usage

1
2
3
4
5
6
7
8
setup_tooltip_options(
  row = TRUE,
  col = TRUE,
  value = TRUE,
  prepend_row = "Row: ",
  prepend_col = "Col: ",
  prepend_value = "Value: "
)

Arguments

row

logical, include row name in tooltip?

col

logical, include column name in tooltip?

value

logical, include value in tooltip?

prepend_row

text to prepend to row name

prepend_col

text to prepend to column name

prepend_value

text to prepend to value

Value

a HeatmapTooltipOptions object which stores these options and can be passed to 'tooltip' argument to main_heatmap and other functions.

Examples

1
2
3
4
5
6
7
mat <- matrix(rnorm(20), ncol = 5, nrow = 4)  
hm1 <- main_heatmap(mat, 
   tooltip = setup_tooltip_options(row = FALSE, col = FALSE,
                                   prepend_value = "Value is ")) 

# Print heatmap if interactive session 
if (interactive()) hm1 

iheatmapr documentation built on July 8, 2020, 7:18 p.m.