ggheatmap: Draw a simple heatmap based on ggplot2

Description Usage Arguments Value Author(s) Examples

View source: R/ggheatmap.R

Description

Draw a simple heatmap based on ggplot2

Usage

1
ggheatmap(data, midpoint, scale = FALSE, show.num = FALSE, size = 4)

Arguments

data

a data.frame with the first collumn as the the sample names usually transformed from the rownames.

midpoint

a numeric indicated the middle value of the heatmap legend.

scale

Boolean value to indicate if scaled using the scale function.

show.num

Boolean value to indicate if show numbers

size

a numeric to indicate the size of numbers

Value

a heatmap

Author(s)

Zhonghui Gai

Examples

1
2
3
4
data <- rowname_to_col(iris)
data <- data[,-6]
data$samples <- factor(data$samples, levels = data$samples)
ggheatmap(data = data, midpoint = 2, scale = TRUE)

ZhonghuiGai/ggheatmap documentation built on Dec. 18, 2021, 8:28 p.m.