I can believe that the heatmap is, at least, taking a long time, because heatmap
does a lot of fancy stuff that takes extra time and memory. Using dat
from @bill_080's example:
## basic command: 66 seconds
t0 <- system.time(heatmap(dat))
## don't reorder rows & columns: 43 seconds
t1 <- system.time(heatmap(dat,Rowv=NA))
## remove most fancy stuff (from ?heatmap): 14 seconds
t2 <- system.time( heatmap(dat, Rowv = NA, Colv = NA, scale="column",
main = "heatmap(*, NA, NA) ~= image(t(x))"))
## image only: 13 seconds
t3 <- system.time(image(dat))
## image using raster capability in R 2.13.0: 1.2 seconds
t4 <- system.time(image(dat,useRaster=TRUE))
You might want to consider what you really want out of the heatmap -- i.e., do you need the fancy dendrogram/reordering stuff?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…