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

2006-03-06 Thread michael watson \(IAH-C\)
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) 

Thanks in advance

Mick


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


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

2006-03-06 Thread Sean Davis



On 3/6/06 9:19 AM, michael watson (IAH-C) [EMAIL PROTECTED]
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

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


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

2006-03-06 Thread Warnes, Gregory R
We're just about to relase a version of gregmisc that improves the code and 
documentation so that Rowv=FALSE and/or Colv=FALSE leaves the rows/columns in 
the original order.

-G

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Sean Davis
 Sent: Monday, March 06, 2006 9:25 AM
 To: michael watson (IAH-C); r-help
 Cc: Warnes, Gregory R
 Subject: Re: [R] Problems with heatmap.2 in the gregmisc package
 
 
 
 
 
 On 3/6/06 9:19 AM, michael watson (IAH-C) 
 [EMAIL PROTECTED]
 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
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html
--
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html