dplot3_heatmap: Interactive Heatmaps

View source: R/dplot3_heatmap.R

dplot3_heatmapR Documentation

Interactive Heatmaps

Description

Draw interactive heatmaps using heatmaply

Usage

dplot3_heatmap(
  x,
  Rowv = TRUE,
  Colv = TRUE,
  cluster = FALSE,
  symm = FALSE,
  cellnote = NULL,
  colorGrad.n = 101,
  colors = NULL,
  space = "rgb",
  lo = "#18A3AC",
  lomid = NULL,
  mid = NULL,
  midhi = NULL,
  hi = "#F48024",
  k_row = 1,
  k_col = 1,
  grid.gap = 0,
  limits = NULL,
  margins = NULL,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  key.title = NULL,
  showticklabels = NULL,
  colorbar_len = 0.7,
  plot_method = "plotly",
  theme = rtTheme,
  row_side_colors = NULL,
  row_side_palette = NULL,
  col_side_colors = NULL,
  col_side_palette = NULL,
  font.size = NULL,
  padding = 0,
  displayModeBar = TRUE,
  modeBar.file.format = "svg",
  filename = NULL,
  file.width = 500,
  file.height = 500,
  file.scale = 1,
  ...
)

Arguments

x

Input matrix

Rowv

Logical or dendrogram. If Logical: Compute dendrogram and reorder rows. Defaults to FALSE If dendrogram: use as is, without reordering See more at heatmaply::heatmaply("Rowv")

Colv

Logical or dendrogram. If Logical: Compute dendrogram and reorder columns. Defaults to FALSE If dendrogram: use as is, without reordering See more at heatmaply::heatmaply("Colv")

cluster

Logical: If TRUE, set Rowv and Colv to TRUE

symm

Logical: If TRUE, treat x symmetrically - x must be a square matrix. Default = FALSE

cellnote

Matrix with values to be displayed on hover. Defaults to ddSci(x)

colorGrad.n

Integer: Number of distinct colors to generate using colorGrad. Default = 101

colors

Character: Acts as a shortcut to defining lo, mid, etc for a number of defaults: "french", "penn", "grnblkred",

space

Character: Which colorspace to use. Option: "rgb", or "Lab". Default = "rgb". Recommendation: If mid is "white" or "black" (default), use "rgb", otherwise "Lab"

lo

Color for low end

lomid

Color for low-mid

mid

Color for middle of the range or "mean", which will result in colorOp(c(lo, hi), "mean"). If mid = NA, then only lo and hi are used to create the color gradient.

midhi

Color for middle-high

hi

Color for high end

k_row

Integer: Number of desired number of groups by which to color dendrogram branches in the rows. Default = NA (determined automatically). See heatmaply::heatmaply("k_row")

k_col

Integer: Number of desired number of groups by which to color dendrogram branches in the columns. Default = NA (determined automatically). See heatmaply::heatmaply("k_col")

grid.gap

Integer: Space between cells. Default = 0 (no space)

limits

Float, length 2: Determine color range. Default = NULL, which automatically centers values around 0

margins

Float, length 4: Heatmap margins.

main

Character: Plot title

xlab

Character: x-axis label

ylab

Character: y-axis label

key.title

Character: Title for the color key.

showticklabels

Logical: If TRUE, show tick labels.

colorbar_len

Numeric: Length of the colorbar.

plot_method

Character: Update February 2021: "ggplot" causes R session to hang on MacOS but "plotly" seems to work

theme

Character: "light", "dark"

row_side_colors

Data frame: Column names will be label names, cells should be label colors. See heatmaply::heatmaply("row_side_colors")

row_side_palette

Color palette function: See heatmaply::heatmaply("row_side_palette")

col_side_colors

Data frame: Column names will be label names, cells

col_side_palette

Color palette function: See heatmaply::heatmaply("col_side_palette")

font.size

Numeric: Font size

padding

Numeric: Padding between cells

displayModeBar

Logical: If TRUE, display the plotly mode bar

modeBar.file.format

Character: File format for image exports from the mode bar

filename

String (Optional: Path to file to save colorbar

file.width

Numeric: Width of exported image

file.height

Numeric: Height of exported image

file.scale

Numeric: Scale of exported image

...

Additional arguments to be passed to heatmaply::heatmaply

Author(s)

E.D. Gennatas

Examples

## Not run: 
x <- rnormmat(200, 20)
xcor <- cor(x)
dplot3_heatmap(xcor)

## End(Not run)

egenn/rtemis documentation built on Oct. 28, 2024, 6:30 a.m.