获取聚类getClusters报错
在更新完新的安装包之后,在获取聚类数就报错: library(ClusterGVis)
protein <- read.delim('Brain_DEP_Mean_Shrinkage.txt', row.names = 1, check.names = FALSE) protein_matrix <- as.matrix(protein) getClusters(exp =protein_matrix) 错误于factoextra::fviz_nbclust(exp, stats::kmeans, method = "wss"): x should be an object of class matrix/data.frame or an object created by the function NbClust() [NbClust package].
看到友友建议后,删除“exp=”后,运行示例数据data(exps)是可以运行的,但是运行我自己的数据后,出现新的报错: library(ClusterGVis)
protein <- read.delim('Brain_DEP_Mean_Shrinkage.txt', row.names = 1, check.names = FALSE) protein_matrix <- as.matrix(protein) getClusters(protein_matrix) 错误于if (cls == "cell_data_set") {: the condition has length > 1 class(protein_matrix)
考虑到更新的安装包的数据格式可能也更新了,但是没有明白应该调整为什么样的格式呢
已经解决了,是本身数据的格式问题
你好,我也遇到同样问题,请问应该修改成什么样的格式
你好,我也遇到同样问题,请问应该修改成什么样的格式
getClusters(exp =protein_matrix),可以把exp换位obj
半个月前还可以运行,现在就要把“exp =”删除了,直接给dataframe就可以运行了,真是神奇啊
Thanks to liuchuan111, that works for me!
遇到同样问题了,应该是ClusterGVis,查看getClusters函数,改成obj了,function (obj = NULL, ...) Usage getClusters(obj = NULL, ...)