[R] labRow/labCol options in heatmap()
Martin Maechler
maechler at stat.math.ethz.ch
Thu Jun 3 15:01:10 CEST 2004
{I'm vading through old "todo" e-mails...}
>>>>> "Anja" == Anja von Heydebreck <heydebre at molgen.mpg.de>
>>>>> on Mon, 16 Feb 2004 11:41:13 +0100 writes:
Anja> The function heatmap() allows to specify row/column labels
Anja> via the options labRow/labCol. From the code of heatmap(),
Anja> I understand that when no labels are specified, the row/column
Anja> labels (or indices) of the input matrix are taken as labels and
Anja> re-ordered together with the rows and columns of the matrix before
Anja> plotting, whereas labels supplied via labRow/labCol are plotted
Anja> in the original order.
<..........>
Anja> To see an example, try
Anja> a <- matrix(c(1,1,1,2,0,2), nrow=3)
Anja> rownames(a) <- 1:3
Anja> x11()
Anja> heatmap(a)
Anja> x11()
Anja> heatmap(a, labRow=rownames(a))
Anja> Is this really meant to work like this? - From
Anja> the help of heatmap(), one might expect also user-supplied
Anja> labels to be re-ordered together with the rows and
Anja> columns of the matrix.
Yes, indeed -- and as you suggest, the current behavior is not
what it should be.
This is being fixed in R-patched aka "R 1.9.1 alpha" (to be
1.9.1 later this month).
Thanking you for the clear report,
Martin Maechler
More information about the R-help
mailing list