Color key in Heat map

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Color key in Heat map

Vasu-2
Hi all,

I am trying to produce a heatmap to display clustering of similar rows in
the data given below. For each given row, different colors are used to
represent the corresponding column value. I want to display the values of
the colors in the form of a color key added to the heatmap. Is there anyway
of doing this?

> z[1:10,1:6]
         [,1]    [,2]    [,3]    [,4]    [,5]    [,6]
 [1,]   403.0   409.3   611.5   569.2   536.6   580.2
 [2,]   757.3   574.4   826.7   595.3   755.2   956.0
 [3,]   284.4   327.3   421.6   336.6   391.3   412.6
 [4,]  2314.2  1685.3  2264.7  2204.1  2233.1  2458.4
 [5,]  1574.5  1273.0  1484.6  1321.2  1474.7  1774.1
 [6,]  2333.7  1796.8  2464.5  2372.5  2095.9  2735.7
 [7,] 13673.9 11463.9 13624.7 14513.9 12934.1 16293.1
 [8,] 17778.8 15248.8 19977.2 19613.4 18609.1 18988.2
 [9,] 31056.6 24869.9 30773.4 32918.6 34412.1 33954.6
[10,]    36.3    69.8    92.0    52.0    57.3    64.9

Also, is it possible to get the order in which the rows will be clustered ,
starting with the first rows joined into a group and then followed by other
grps added. I thought i could extract the order by using $rowInd, but looks
like it's the order in which the rows are reordered in the map. Please let
me know how to do this.

Thanks,
Vasu.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html