tests/heatmap_to_heatmap.2_test.R

library(gplots)
data(mtcars)

x <- as.matrix(mtcars)

## draws expected image
testHeatmap <- heatmap(x, Colv=NA, col=bluered(256), scale="column",
                       keep.dendro=TRUE)

# to prove this dendro is OK, redraw with same function:
heatmap(x, Colv=NA, col=bluered(256), scale="column",
        keep.dendro=TRUE, Rowv=testHeatmap$Rowv)

# but it doesn't work with heatmap.2()
heatmap.2(x, Colv=NA, col=bluered(256), scale="column",
          Rowv=testHeatmap$Rowv, dendrogram="row")

Try the gplots package in your browser

Any scripts or data that you put into this service are public.

gplots documentation built on May 2, 2019, 5:50 p.m.