add_main_heatmap: add_main_heatmap

Description Usage Arguments Value Author(s) See Also Examples

Description

Adds an additional main heatmap to an iheatmap object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
## S4 method for signature 'IheatmapHorizontal,matrix'
add_main_heatmap(
  p,
  data,
  name = "Signal",
  x = default_x(data),
  colors = pick_continuous_colors(zmid, zmin, zmax, p),
  colorbar_position = get_colorbar_position(p),
  show_colorbar = TRUE,
  zmin = min(data, na.rm = TRUE),
  zmax = max(data, na.rm = TRUE),
  zmid = 0,
  col_order = NULL,
  x_categorical = NULL,
  side = c("right", "left"),
  size = 1,
  buffer = 0.04,
  text = signif(data, digits = 3),
  tooltip = setup_tooltip_options(),
  xname = NULL,
  pname = name,
  ...
)

## S4 method for signature 'IheatmapVertical,matrix'
add_main_heatmap(
  p,
  data,
  name = "Signal",
  y = default_y(data),
  colors = pick_continuous_colors(zmid, zmin, zmax, p),
  colorbar_position = get_colorbar_position(p),
  show_colorbar = TRUE,
  zmin = min(data, na.rm = TRUE),
  zmax = max(data, na.rm = TRUE),
  zmid = 0,
  row_order = NULL,
  y_categorical = NULL,
  side = c("bottom", "top"),
  size = 1,
  buffer = 0.04,
  text = signif(data, digits = 3),
  tooltip = setup_tooltip_options(),
  yname = NULL,
  pname = name,
  ...
)

Arguments

p

Iheatmap-class object

data

matrix

name

name of colorbar, will determine if colorbar is shared with existing plot

x

x axis labels (by default rownames of data); only used if orientation is horizontal

colors

color palette name or vector of colors

colorbar_position

colorbar placement

show_colorbar

display the colorbar?

zmin

minimum for colorscale

zmax

maximum for colorscale

zmid

midpoint for scale

col_order

column ordering for this heatmap; only used if orientation is horizontal

x_categorical

is x categorical? will guess if not provided

side

which side of the current plot to add this heatmap?

size

relative size of plot. size relative to first heatmap

buffer

amount of space to leave empty before this plot, relative to size of first heatmap

text

text of value to display for data

tooltip

tooltip options, see setup_tooltip_options

xname

internal name for x axis

pname

internal name for plot

...

additional arguments (ignored)

y

y axis labels (by default colnames of data); only used if orientation is vertical

row_order

row ordering for this heatmap; only used if orientation is vertical

y_categorical

is y categorical? will guess if not provided

yname

internal name for y axis

Value

Iheatmap-class object, which can be printed to generate an interactive graphic

Author(s)

Alicia Schep

See Also

iheatmap, main_heatmap

Examples

1
2
3
4
5
6
mat <- matrix(rnorm(20), ncol = 5, nrow = 4) 
mat2 <-  matrix(rnorm(24), ncol = 6, nrow = 4) 
hm <- iheatmap(mat) %>% add_main_heatmap(mat2)

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

iheatmapr documentation built on Jan. 13, 2021, 5:11 p.m.