[R] :dendrogram reorder question

xchen chenxh007 at gmail.com
Fri Nov 17 04:17:12 CET 2006


Hi,

I have problem of reordering in the heatmap.

Followering is an example code:

 require(graphics)
     x  <- as.matrix(mtcars)
     rc <- rainbow(nrow(x), start=0, end=.3)
     cc <- rainbow(ncol(x), start=0, end=.3)
     hv <- heatmap(x, col = cm.colors(256), scale="column",
                   RowSideColors = rc, ColSideColors = cc, margin=c(5,10),
                   xlab = "specification variables", ylab= "Car Models",
                   main = "heatmap(<Mtcars data>, ..., scale = \"column\")")
I would like to place "Honda Civic" variables to the top of the graph. 
Is there any convinience way to swap a particular element to a specific 
position? Thanks a lot in advance.

Xiaohui



More information about the R-help mailing list