heatmap_bp: Heatmap with barplots

heatmap.bpR Documentation

Heatmap with barplots

Description

Heatmap of a numeric matrix with barplots summarizing columns and rows.

Usage

heatmap.bp(
  x,
  cbarplot = TRUE,
  rbarplot = TRUE,
  legend = TRUE,
  clabels = TRUE,
  rlabels = TRUE,
  na.rm = TRUE,
  scale = c("row", "column", "none"),
  col.ramp = viridisLite::viridis(n = 100, alpha = 1),
  ...
)

Arguments

x

a numeric matrix.

cbarplot

a logical indicating whether the columns should be summarized with a barplot.

rbarplot

a logical indicating whether the rows should be summarized with a barplot.

legend

a logical indicating whether a legend should be plotted.

clabels

a logical indicating whether column labels should be included.

rlabels

a logical indicating whether row labels should be included.

na.rm

a logical indicating whether missing values should be removed.

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".

col.ramp

vector of colors to be used for the color ramp.

...

additional arguments to be passed on.

Details

The function heatmap.bp creates a heatmap from a numeric matrix with optional barplots to summarize the rows and columns.

See Also

heatmap, image, heatmap2 in gplots, pheatmap.

Examples

library(vcfR)

x  <- as.matrix(mtcars)

heatmap.bp(x)
heatmap.bp(x, scale="col")
# Use an alternate color ramp
heatmap.bp(x, col.ramp = colorRampPalette(c("red", "yellow", "#008000"))(100))
heatmap.bp(x)

## Not run: 
heatmap.bp(x, cbarplot = FALSE, rbarplot = FALSE, legend = FALSE)
heatmap.bp(x, cbarplot = FALSE, rbarplot = TRUE, legend = FALSE)
heatmap.bp(x, cbarplot = FALSE, rbarplot = FALSE, legend = TRUE)
heatmap.bp(x, cbarplot = FALSE, rbarplot = TRUE, legend = TRUE)

heatmap.bp(x, cbarplot = TRUE, rbarplot = FALSE, legend = FALSE)
heatmap.bp(x, cbarplot = TRUE, rbarplot = TRUE, legend = FALSE)
heatmap.bp(x, cbarplot = TRUE, rbarplot = FALSE, legend = TRUE)
heatmap.bp(x, cbarplot = TRUE, rbarplot = TRUE, legend = TRUE)

## End(Not run)

 

vcfR documentation built on May 29, 2024, 10:57 a.m.