ggheatmap: generate a heatmap + dendrograms, ggplot2 style

Description Usage Arguments Value Author(s) Examples

View source: R/ggplot-heatmap.R

Description

generate a heatmap + dendrograms, ggplot2 style

Usage

1
ggheatmap(x, hm.colours = my.colours)

Arguments

x

data matrix

hm.colours

vector of colours (optional)

Value

invisibly returns a list of ggplot2 objects. Display them with ggheatmap.show()

Author(s)

Chris Wallace

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## test run
## simulate data
library(mvtnorm)
sigma=matrix(0,10,10)
sigma[1:4,1:4] <- 0.6
sigma[6:10,6:10] <- 0.8
diag(sigma) <- 1
X <- rmvnorm(n=100,mean=rep(0,10),sigma=sigma)
 
## make plot
p <- ggheatmap(X)
 
## display plot
ggheatmap.show(p)

chr1swallace/random-functions documentation built on Oct. 6, 2017, 11:50 a.m.