[R] Questions about 'heatmap.2' function
karena
dr.jzhou at gmail.com
Tue Apr 26 22:06:34 CEST 2011
I am trying a heatmap.
I have 30 individuals and 1,000 genes.
Some components I want for this heatmap plot: (1) the 'color-key'; (2) a
banner across the top to emphasize how the hierarchical clustering has
correctly split the data into the two groups;
I use the 'heatmap.2' function in the 'gplots' package, and my function is
as below:
------------------------------------------------------------------------------
jpeg('/plots/heatmap.jpg')
heatmap.2(data, scale="column", key=TRUE, trace="none", xlab="individuals",
ylab="genes", main="heatmap", density.info="histogram", col=redblue)
dev.off()
------------------------------------------------------------------------------
I have two problems now:
1) I don't know how to use the 'ColSideColors' option to emphasize the
'groups' rather than 'each individuals'.
2) When I only included 100 genes in my heatmap, I had no problems getting
the 'color-key'; However, when I included more genes (i.e., 300 genes), I
can NOT get the 'color-key' any more, even that all the options are exactly
the same), and the error message I got is :
"Error in image.default(z = matrix(z, ncol = 1), col = col, breaks =
tmpbreaks, :
breaks must all be finite"
Can anyone help me on this?
thank you very much!
karena
--
View this message in context: http://r.789695.n4.nabble.com/Questions-about-heatmap-2-function-tp3476387p3476387.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list