mcheatmaps-package: Multiple matrices heatmap visualization

Description Details Author(s) Examples

Description

mcheatmaps serves to visualize multiple different symmetric matrices and matrix clusters in a single figure using a dendogram, two half heatmaps and various color labels.

Details

Package: mcheatmaps
Type: Package
Version: 1.0
Date: 2013-09-05
License: GPL-3

Author(s)

Thierry Chenard thierry.chenard@usherbrooke.ca, Rafael Najmanovich rafael.najmanovich@usherbrooke.ca

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
library(mcheatmaps)
mpg=matrix(nrow=nrow(mtcars),ncol=nrow(mtcars))
rownames(mpg)=rownames(mtcars)
colnames(mpg)=rownames(mtcars)
hp=matrix(nrow=nrow(mtcars),ncol=nrow(mtcars))
rownames(hp)=rownames(mtcars)
colnames(hp)=rownames(mtcars)
wt=matrix(nrow=nrow(mtcars),ncol=nrow(mtcars))
rownames(wt)=rownames(mtcars)
colnames(wt)=rownames(mtcars)
for(i in 1:nrow(mtcars)){
  for(j in 1:nrow(mtcars)){
    mpg[i,j]=abs(mtcars$mpg[i]-mtcars$mpg[j])
    hp[i,j]=abs(mtcars$hp[i]-mtcars$hp[j])
    wt[i,j]=abs(mtcars$wt[i]-mtcars$wt[j])
  }
}
label=t(mtcars[,colnames(mtcars) == "cyl" | colnames(mtcars) == "gear", drop=FALSE])
aliases=matrix(c("cyl","gear","number of cylinders","number of gears"),2,2)
mcheatmaps(matA=mpg,matB=hp,matC=wt,flabels=label,aliases=aliases,pdfname="CarStats",
legA="Difference in gas consumtion (mpg)",legB="Difference in HorsePower",
legC="Weight Difference (tonne)")

Example output

Loading required package: gridBase
Loading required package: grid
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
[1] "Clustering method = average ; cophenetic corr. = 0.805"
[1] "Lower hmin= 0 hmax= 283"
[1] "correlation between lower triangle and matA = -0.464"
[1] "Upper hmin= 0 hmax= 3.911"
[1] "correlation between upper triangle and matA = -0.686"
[1] "correlation between upper and lower triangles = 0.307"
[1] "image is saved as /work/tmp/CarStats.pdf"
[1] "legend is saved as /work/tmp/CarStats_labels.pdf"

mcheatmaps documentation built on May 2, 2019, 2:09 a.m.