Learn R Programming

rock (version 0.8.1)

heatmap_basic: Generic convenience function to create a heatmap

Description

Generic convenience function to create a heatmap

Usage

heatmap_basic(
  data,
  x,
  y,
  fill,
  xLab = x,
  yLab = y,
  fillLab = fill,
  plotTitle = "Heatmap",
  fillScale = ggplot2::scale_fill_viridis_c(),
  theme = ggplot2::theme_minimal()
)

Value

The heatmap, as a ggplot2 object.

Arguments

data

A data frame

x, y, fill

The variables (columns) in data to use for the x axis, y axis, and fill of the heatmap, respectively.

xLab, yLab, fillLab

The labels to use for the x axis, y axis, and fill, respectively

plotTitle

The plot title.

fillScale

The fill scale.

theme

The theme.

Examples

Run this code
rock::heatmap_basic(mtcars, 'am', 'cyl', 'mpg');

Run the code above in your browser using DataLab