在R程序中引导自身构建的函数pvclust无效,并且给定值为0

问题描述

1。我正在使用菊花函数使用封装组件簇中的gower度量来计算距离,并编写了一个输出距离矩阵的函数。

2。当我尝试使用pvclust软件包引导群集时,结果出错了。

3。正如您在图中所看到的那样,自举概率和p值的结果均为零。

我正在努力弄清正在发生什么以及为什么值是零。

我在下面附上代码

#Function for calculating the distance
library(cluster)
dis=function(data){
a=cluster::daisy(data,metric = c("gower")) 
a=as.matrix(a)
a=as.dist(a)
return(a)
}

boston.pv <- pvclust(mtcars,method.hclust = "ward.D2",method.dist = dis,nboot=100,parallel=F)

plot(boston.pv)

谢谢。

The image was generated using the plot(boston.pv). The values in the cluster nodes were zero and I don't know how

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...