Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在R集群中,热图是如何工作的?我们如何获得组数?_R_Cluster Analysis_Heatmap - Fatal编程技术网

在R集群中,热图是如何工作的?我们如何获得组数?

在R集群中,热图是如何工作的?我们如何获得组数?,r,cluster-analysis,heatmap,R,Cluster Analysis,Heatmap,我有一个用热图函数绘制的距离矩阵。热图功能将数据聚集到组中。我想将它们聚集到同一组 理由如下: heatmap(distanceMatrix, symm = T) 数据组在矩阵的对角中是明显的 大概是这样的: 事实上,我在寻找团体的数量。之后,我可以在R中使用hclust和cut对数据进行分区。您看过函数的帮助文件(“热图”)了吗?请参阅下面的参数 distfun function used to compute the distance (dissimilarity) between b

我有一个用
热图
函数绘制的距离矩阵。热图功能将数据聚集到组中。我想将它们聚集到同一组

理由如下:

heatmap(distanceMatrix, symm = T)
数据组在矩阵的对角中是明显的

大概是这样的:


事实上,我在寻找团体的数量。之后,我可以在R中使用
hclust
cut
对数据进行分区。

您看过函数的帮助文件(“热图”)了吗?请参阅下面的参数

distfun 
function used to compute the distance (dissimilarity) between both rows and columns. Defaults to dist.

hclustfun   
function used to compute the hierarchical clustering when Rowv or Colv are not dendrograms. Defaults to hclust. Should take as argument a result of distfun and return an object to which as.dendrogram can be applied.
库(NbClust)
包解决了这个问题


“NbClust:确定集群数量的索引检查:NbClust包”

谢谢,我正在查找组的数量。编辑。