[R] plot two pearson correlation matrix on one heatmap

Wendy wendy2.qiao at gmail.com
Sat Feb 5 16:23:21 CET 2011


Hi all,

I am trying to plot two pearson correlation coefficient matrices  on one
heatmap using heatmap.2. I combined two matrices as following

A = [0.8 0.9;
      0.75 0.95]

B = [0.82 0.87
      0.94 0.74]

combined = [0.8 0.9 0 0;
                 0.75 0.95 0 0
                 0 0 0.82 0.87
                 0 0 0.94 0.74]

 heatmap.2(combined,distfun=function(c) as.dist(1-c),hclustfun=function(c)
hclust(c,method="average"), race="none",
col=greenred(75),trace="none",dendrogram ="column")

The resultant heatmap having a scale from 0 to 1. I want to ignore the zero
elements in the combined matrix and display them in black. Also, I want the
scale to be greater than 0.7. I looked at the heatmap.2 webpage, but did not
have a clue. Could anybody help me? Thank you in advance.

Wendy
-- 
View this message in context: http://r.789695.n4.nabble.com/plot-two-pearson-correlation-matrix-on-one-heatmap-tp3261882p3261882.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list