Hello, there,
R document for heatmap says that Rowv could be a vector of values to specify 
the row order. However, I couldn't figure out how to apply it. A simple example 
here:> b=as.data.frame(matrix(c(3,4,5,8,9,10,13,14,15,27,19,20),3,4))
> b
  V1 V2 V3 V4
1  3  8 13 27
2  4  9 14 19
3  5 10 15 20
> row.names(b)=c("a","b","c")
> b
  V1 V2 V3 V4
a  3  8 13 27
b  4  9 14 19
c  5 10 15 20
> heatmap(as.matrix(b))
What I got: "a" stays at the bottom of the heatmap.
 Now I would like to put row "a" to the top row, how do I do that?I tried 
provide a vector of values (all the possible combination of 1,2,3) to Rowv,  
"a" is always stay at the bottom
Any input would be very helpful!
Thanks.
Ace

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to