[R] heatmap function
Martin Maechler
maechler at stat.math.ethz.ch
Fri Oct 17 18:26:11 CEST 2003
>>>>> "AndyL" == Liaw, Andy <andy_liaw at merck.com>
>>>>> on Fri, 17 Oct 2003 09:10:16 -0400 writes:
AndyL> One of the good thing about R (and S in general, I
AndyL> guess) is that if a function does mostly what you
AndyL> want, except for some small things, you can just make
AndyL> another copy of it, change the name, and make the
AndyL> desired changes to the new function (provided the
AndyL> changes you need to make isn't in the compiled code,
AndyL> but R is Open Source...).
AndyL> In this case, you should be able to strip out the
AndyL> code in heatmap() that plot the top dendrogram w/o
AndyL> much problem. While your at it, you might want to
AndyL> change the layout() so as not to leave the blank
AndyL> space on top.
Yes, thanks Andy.
heatmap() has already been improved quite a bit for R 1.8.0
(and particularly the dendrogram reordering which lead to bad
drawings has been fixed, the drawings are now fine).
But I have received many suggestions (from Gregory Warnes,
notably, and Art Owen, and others) that just didn't make it
anymore in time before feature freeze.
The above {an option for *dis*allowing one or the other
dendrogram} has been among the wishes, and is reasonable.
heatmap() being a relatively new function in R, and a "high
level" one (i.e. typically not used as basic building bloc for
other functions), not even usable as a sub-plot in other plots
because it relies on layout(), but also widely used
in some contexts I'd vote for being allowed to add features to
it even before the next major release of R.
>> -----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
More information about the R-help
mailing list