[R] a bug in heatmap.plus?

Shi, Tao shidaxia at yahoo.com
Thu Jun 9 06:50:04 CEST 2011


Hi Allen and list,

See the code below.  I've tried it on R2.13 and R2.8.0 using either heatmap.plus 1.3 or the latest.  All gave the same results.  The problem is in the last line: when I tried to plot two different color bars, the one corresponding to "cm.colors(10)" is not correct (it starts with one black and one red.  Not sure where they're from?)

Any ideas?

Thanks!

...Tao


library(heatmap.plus)
set.seed(1234)

x <- matrix(rnorm(400), ncol=10)
heatmap(x, ColSideColors= cm.colors(10), Colv=NA)
heatmap.plus(x, ColSideColors=cbind(cm.colors(10), cm.colors(10)), Colv=NA)
heatmap.plus(x, ColSideColors=cbind(rep(1:2,each=5), cm.colors(10)), Colv=NA)



More information about the R-help mailing list