[R] heatmap function

Liaw, Andy andy_liaw at merck.com
Fri Oct 17 15:10:16 CEST 2003


One of the good thing about R (and S in general, I guess) is that if a
function does mostly what you want, except for some small things, you can
just make another copy of it, change the name, and make the desired changes
to the new function (provided the changes you need to make isn't in the
compiled code, but R is Open Source...).

In this case, you should be able to strip out the code in heatmap() that
plot the top dendrogram w/o much problem.  While your at it, you might want
to change the layout() so as not to leave the blank space on top.

HTH,
Andy

> -----Original Message-----
> From: Martin Olivier [mailto:martinol at ensam.inra.fr] 
> Sent: Friday, October 17, 2003 5:32 AM
> To: r-help
> Subject: [R] heatmap function
> 
> 
> Hi all,
> 
> By default, the heatmap function gives an image with a 
> dendrogram added 
> to the
> left side and to the top. Is it possible to only add the 
> dendrogram to 
> the left side
> and  let the order of the columns unchanged ?
> 
> I tried
> heatmap(mat, col=rbg,Rowv=res.hclust$order,Colv=1:dim(mat)[[2]]).
> In this case, the order of the columns are unchanged but a 
> dendrogram is added to the top. How can I avoid it?
> 
> Thanks,
> Oiliver
> 
> -- 
> 
> -------------------------------------------------------------
> Martin Olivier
> INRA - Unité protéomique           LIRMM - IFA/MAB
> 2, Place Viala                     161, rue Ada
> 34060 Montpellier Cédex 1          34392 Montpellier Cédex 5	
> 
> Tel : 04 99 61 27 01               Tel : O4 67 41 86 71
> martinol at ensam.inra.fr             martin at lirmm.fr
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list 
> https://www.stat.math.ethz.ch/mailman/listinfo> /r-help
>




More information about the R-help mailing list