plotHeatmap: Plot heatmap.

View source: R/plotHeatmap.R

plotHeatmapR Documentation

Plot heatmap.

Description

Given a matrix or list of matrizes x this function visualizes each matrix with a heatmap.

Usage

plotHeatmap(x, value.name = "Value", show.values = FALSE)

Arguments

x

[matrix | list[matrix]]
Either a matrix or a list of matrizes.

value.name

[character(1)]
Name for the values represented by the matrix. Internally, the matrix is transformed into a data.frame via melt in order to obtain a format which may be processed by ggplot easily. Default is “Value”.

show.values

[logical(1L)]
Should the values be printed within the heatmap cells? Default is FALSE.

Value

[ggplot] ggplot object.

Examples

# simulate two (correlation) matrizes
x = matrix(runif(100), ncol = 10)
y = matrix(runif(100), ncol = 10)
## Not run: 
pl = plotHeatmap(x)
pl = plotHeatmap(list(x, y), value.name = "Correlation")
pl = plotHeatmap(list(MatrixX = x, MatrixY = y), value.name = "Correlation")

## End(Not run)

ecr documentation built on March 31, 2023, 10:07 p.m.