[R] Flipping a heatmap

Duncan Murdoch dmurdoch at pair.com
Thu Sep 11 14:53:03 CEST 2003


On Thu, 11 Sep 2003 07:46:16 -0400, you wrote:

>My feeling is that heatmap is not the right thing to use on a correlation
>matrix.  The heatmap function expects a data matrix, and does a two-way
>clustering of cases and variables.  It tries to rearrange the rows and
>columns so that similar colors are closer together.  This obviously will not
>work for a correlation matrix.  

There are several different ways you might organize the rows and
columns of a correlation matrix, but rearranging it to put equal
correlations together sounds like one sensible idea.  You'd probably
want row and column labels rather than the dendrogram heatmap() puts
on, but other than that, it seems like a nice idea to me.

Duncan Murdoch




More information about the R-help mailing list