heatmap 热图是一种有效的数据可视化方法,一般借助矩阵数据间相关性作图。
exampleData <- matrix(log2(rexp(1000)/rexp(1000)),nrow=200)
evar <- apply(exampleData,1,var)
mostVariable <- exampleData[evar>quantile(evar,0.75),]
install.packages("gplots")
library(gplots)
heatmap.2(mostVariable,trace="none",col=greenred(10))
heatmap.2(mostVariable,trace="none",col=greenred(10),ColSideColors=bluered(5))
ord <- order(rowSums(abs(mostVariable)),decreasing=T)
heatmap.2(mostVariable[ord,],Rowv=F,dendrogram="column",trace="none",col=greenred(10))