[R] heatmap.2 does not accept dendogram passed to Rowv param

Mark Borowsky borowsky at molbio.mgh.harvard.edu
Sat Apr 25 17:11:15 CEST 2009


heatmap.2() from gplots does not seem to accept a dendrogram produced by 
the stats package function heatmap():

 > 
testHeatmap=heatmap(test[,1:40],Colv=NA,col=bluewhitered(256),labRow=testL,keep.dendro=TRUE)
# draws expected image

# to prove this dendro is OK, redraw with same function:
 > 
heatmap(test[,1:40],Colv=NA,col=bluewhitered(256),labRow=testL,keep.dendro=TRUE,Rowv=testHeatmap$Rowv)
# draws expected image again

# but it doesn't work with heatmap.2():
 > 
heatmap.2(test[,1:40],Colv=NA,col=bluewhitered(256),labRow=testL,Rowv=testHeatmap$Rowv,trace='none')
Error in if ((Colv == "Rowv") && (!isTRUE(Rowv) || is.null(Rowv))) Colv 
<- FALSE :
  missing value where TRUE/FALSE needed

Am I wrong to expect heatmap.2() to accept this param?  According to 
documentation it should behave same as heatmap().




More information about the R-help mailing list