hmOptions: Modify d3heatmap options

Description Usage Arguments Value Source See Also Examples

View source: R/hmOptions.R

Description

Change options for a d3heatmap

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
hmOptions(
  d3heatmap,
  title,
  scale = c("none", "row", "column"),
  scale.by.range,
  na.rm,
  na.value,
  show.grid,
  animation.duration,
  reverse.columns
)

Arguments

d3heatmap

a d3heatmap object created from the d3heatmap()

title

string Plot title. Defaults to NULL.

scale

character indicating if the values should be centered and scaled in either the row direction or the column direction, or none. The default is "none".

scale.by.range

logical indicating whether to scale rows or columns by the range of each row and column. Setting this parameter to TRUE automatically sets na.rm to TRUE

na.rm

logical indicating whether NA's should be removed.

na.value

numeric indicating where NA's should be substituted to trigger the NA color.

show.grid

TRUE to show gridlines, FALSE to hide them, or a numeric value to specify the gridline thickness in pixels (can be a non-integer).

animation.duration

Number of milliseconds to animate zooming in and out. For large x it may help performance to set this value to 0.

reverse.columns

logical indicating if the column order should be reversed for plotting. Default (when missing) - is FALSE, unless symmetrical is TRUE... useful for correlation matrices.

Value

Modified d3heatmap object

Source

The interface was inspired by dygraphs

See Also

heatmap, heatmap.2

Examples

1
2
3
4
5
6
7
8
## Not run: 

d3heatmap(mtcars, scale = "column", col = "Blues") %>%
  hmOptions(scale.by.range = TRUE, show.grid = FALSE,
 		animation.duration = 400)


## End(Not run)

rstudio/d3heatmap documentation built on May 26, 2021, 10:16 p.m.