我生成了树形图并获得了k个簇。我想通过使用现有的树形图和聚类获得热图。我想在多个页面中显示我的热图,所以我在不同的调用中逐个完成。为了使颜色图表可比,我还设置了pal.values。这是我的代码示例:
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
从那里,当我检查成员资格是否匹配时,它显示为TRUE和FALSE的混合。我无法找出我的代码有什么问题。你能请教我吗?