Description Usage Arguments Value Author(s) Examples
Creates a correlation heatmap for any numerical matrix.
1 | Soraya.cormat(data, sample.names = NULL, color = NULL, use = "everything", title = "", theme = soraya.heatmap.theme)
|
data |
A numerical matrix. |
sample.names |
A character vector with sample names. For each data column, a sample name should be given. |
color |
A character vector containing color codes, as returned from brewer.pal(). |
use |
The use variable from the cor() function. |
limits |
A numeric vector of length two describing the scale limits. Defaults to the minimum and maximum of observed correlation values. |
title |
The plots title. |
theme |
An optional ggplot theme that defines plot details. |
A ggplot2 figure.
Soraya Hoelper and Jens Preußner.
1 2 3 4 | ##---- Load the data ----
data(diamonds)
d = dcast(diamonds, carat ~ color, value.var = "price", fun.aggregate = mean)
Soraya.cormat(d[,2:8], color=brewer.pal(9,"Blues"), title="Diamonds price correlation")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.