如何在R中结合这两件事? 我想隐藏树状图并显示值吗?
rerender
这显示值-
library(ComplexHeatmap)
这隐藏了树状图-
Heatmap(mat,
name = "foo", cell_fun = function(j, i, x, y, width, height, fill)
{
grid.text(sprintf("%.1f", mat[i, j]), x, y, gp = gpar(fontsize = 10))
}
)
数据-
heatmap(mat, Colv=NA, Rowv=NA)
答案 0 :(得分:0)
要隐藏ComplexHeatmap::Heatmap
中的树状图,可以使用show_row_dend
和show_column_dend
两个参数:
library(ComplexHeatmap)
Heatmap(mat,
name = "foo", cell_fun = function(j, i, x, y, width, height, fill)
{
grid.text(sprintf("%.1f", mat[i, j]), x, y, gp = gpar(fontsize = 10))
},
show_row_dend = FALSE,
show_column_dend = FALSE)
)
要安装软件包:
source("https://bioconductor.org/biocLite.R")
biocLite("ComplexHeatmap")