[Rd] heatmap without dendrogams (PR#13512)

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Mar 5 20:09:33 CET 2009


Thanks Uwe, I've added your patch to R-devel (2.9.0 to be).

On Thu, 19 Feb 2009, ligges at statistik.tu-dortmund.de wrote:

>
>
> 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
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list