ggheatmap: Make heatmaps with nice defaults

Description Usage Arguments Value Examples

Description

Make heatmaps with nice defaults

Usage

1
ggheatmap(plot_data, opts = list())

Arguments

plot_data

[data.frame] A data.frame with data to create the heatmap from. The variables for x, y axis, filling, and faceting must be provided by opts. Otherwise, they will be filled in with defaults, see merge_heatmap_opts(). The order in which variables appear on the axes is controlled by opts$x_order and opts$y_order.

opts

[list] A partially specified list used to customize appearance in ggplot theme(). Options that are already specified will not be changed, those that are not will be filled in with defaults.

Value

p [ggplot] A ggplot geom_tile() heatmap with nice defaults.

Examples

1
2
3
4
X <- matrix(rnorm(10 * 10), 10, 10, dimnames = list(1:10, letters[1:10]))
plot_data <- reshape2::melt(X, varnames = c("x", "y"), value.name = "fill")
opts <- list(y_order = letters[10:1])
ggheatmap(plot_data, opts)

krisrs1128/ggscaffold documentation built on May 20, 2019, 1:26 p.m.