Soraya.cormat: Soraya.cormat

Description Usage Arguments Value Author(s) Examples

Description

Creates a correlation heatmap for any numerical matrix.

Usage

1
Soraya.cormat(data, sample.names = NULL, color = NULL, use = "everything", title = "", theme = soraya.heatmap.theme)

Arguments

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.

Value

A ggplot2 figure.

Author(s)

Soraya Hoelper and Jens Preußner.

Examples

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

jenzopr/hlap documentation built on May 19, 2019, 5:07 a.m.