[R] Problems with heatmap.2 in the gregmisc package

Sean Davis sdavis2 at mail.nih.gov
Mon Mar 6 15:24:40 CET 2006




On 3/6/06 9:19 AM, "michael watson (IAH-C)" <michael.watson at bbsrc.ac.uk>
wrote:

> Hi
> 
> Sorry to revisit an old problem, I seemed to solve this in 2004, only
> for it to resurface :-S
> 
> I am trying to plot a heatmap, and I don't want the columns of my matrix
> re-ordered.  The function doesn't seem to behave as the help would have
> you believe:
> 
> a <- matrix(rnorm(100),nr=20)
> a.d  <- dist(a)
> a.hc <- hclust(a.d)
> a.de <- as.dendrogram(a.hc)
> 
> # columns are re-ordered
> heatmap.2(a, Rowv=a.de, Colv=FALSE)
> 
> # columns are re-ordered
> heatmap.2(a, Rowv=a.de, Colv=1:5)
> 
> # columns are re-ordered
> heatmap.2(a, Rowv=a.de, dendrogram="row")
> 
> # error
> heatmap.2(a, Rowv=a.de, Colv=FALSE, dendrogram="row")

How about:

 heatmap.2(a,Rowv=a.de,Colv=1:5,dendrogram="row")

I thought Greg knew about this, but I'm not sure.  Have you updated gregmisc
recently?

Sean




More information about the R-help mailing list