Last chance! 50% off unlimited learning
Sale ends in
Heatmap of a numeric matrix with barplots summarizing columns and rows.
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),
...
)
a numeric matrix.
a logical indicating whether the columns should be summarized with a barplot.
a logical indicating whether the rows should be summarized with a barplot.
a logical indicating whether a legend should be plotted.
a logical indicating whether column labels should be included.
a logical indicating whether row labels should be included.
a logical indicating whether missing values should be removed.
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".
vector of colors to be used for the color ramp.
additional arguments to be passed on.
The function heatmap.bp creates a heatmap from a numeric matrix with optional barplots to summarize the rows and columns.
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)
if (FALSE) {
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)
}
Run the code above in your browser using DataLab