Re: [Rd] heatmap without dendrogams (PR#13512)

From: <ligges_at_statistik.tu-dortmund.de>
Date: Thu, 19 Feb 2009 19:00:38 +0100 (CET)

j.j.goeman_at_lumc.nl wrote:
> Full_Name: Jelle Goeman
> Version: 2.8.1
> OS: Win XP
> Submission from: (NULL) (87.212.67.197)
>
>
> I get the following error message when I try to make a heatmap (package stats),
> without the associated dendrograms.
>
> X <- matrix(rnorm(200),20,10)
> XX <- crossprod(X)
> heatmap(XX, Rowv= NA, revC=TRUE)
> Error in rev(ddr) : object "ddr" not found
> heatmap(XX, Rowv= NA, sym=TRUE)
> Error in heatmap(XX, Rowv = NA, sym = TRUE) : object "ddr" not found
>
> According to the help file, this should work; indeed it does if I set revC or
> sym to FALSE. Seems like ddr should be initialized to something like 1:ncol(X)
> for the no-dendrogram case.
>
> Kind regards,
>
> Jelle
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

Since it looks like nobody answered so far, let me suggest a patch:

D:\RCompile\recent\R\src\library\stats\R>diff -u dendrogram.R dendrogram.R-new
--- dendrogram.R 2009-02-19 18:54:18.832062400 +0100 +++ dendrogram.R-new 2009-02-19 18:52:29.612961900 +0100 @@ -699,7 +699,7 @@

      x <- t(x)
      if(revC) { # x columns reversed
      iy <- nr:1

- ddr <- rev(ddr)
+ if(doRdend) ddr <- rev(ddr)
      x <- x[,iy]
      } else iy <- 1L:nr



Best wishes,
Uwe Ligges



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 19 Feb 2009 - 17:11:40 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 05 Mar 2009 - 20:30:56 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive