R 给定簇组的过热使用

R 给定簇组的过热使用,r,heatmap,R,Heatmap,我生成了树状图,得到了k个簇。我想通过使用现有的树状图和簇来获得热图。我想在多个页面上显示我的热图,所以我在单独的通话中逐个显示。为了使颜色图表具有可比性,我还设置了pal.value。以下是我的代码示例: sh <- superheat(X = cbind(dt[grep("Action", colnames(dt))], profile), heat.pal = brewer.pal(8, 'RdBu')[8:1], he

我生成了树状图,得到了k个簇。我想通过使用现有的树状图和簇来获得热图。我想在多个页面上显示我的热图,所以我在单独的通话中逐个显示。为了使颜色图表具有可比性,我还设置了pal.value。以下是我的代码示例:

sh <- superheat(X = cbind(dt[grep("Action", colnames(dt))], profile),
                heat.pal = brewer.pal(8, 'RdBu')[8:1],
                heat.pal.values = c(-1.4:2.3),
                bottom.label = 'variable',
                grid.hline.col = '#F0EBEB',
                grid.vline.col = '#F0EBEB',
                smooth.heat = TRUE,
                membership.rows = hc$cluster,
                column.title = 'factors', row.title = 'Clusters',
                bottom.label.text.size = 1.5, bottom.label.text.angle = 90)
sh$membership.rows == hc$cluster
sh