関数を使用gplots
しRcolorbrewer
てヒートマップを作成するために and を使用していheatmap2()
ます。
私のデータには、このサンプルにデータが記録されていないことを示すゼロがあります。ヒートマップを作成するには、これらのゼロを白に、残りの部分を 3 色の凡例にします。
これまでのコードは次のとおりです。
my_palette <- colorRampPalette(c("blue", "green", "red"))(n = 299)
col_breaks = c(seq(0.001,0.2,length=100), seq(0.3,0.4,length=100), seq(0.5,0.6,length=100))
library(gplots)
heatmap.2(deco.hmBB, main = "BCC at day 0 and day 10", margins = c(6,9), trace = "none",
density.info = "none", dendrogram = "none", col = my_palette, breaks = col_breaks,
Colv = "NA")