Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getClusters报错、K-mean聚类用visCluster画线图出错 #98

Open
EdmundFieldQIN opened this issue Sep 18, 2024 · 2 comments
Open

Comments

@EdmundFieldQIN
Copy link

matrix <- read.delim("盐胁迫.txt",row.names = 1,header = T)
class(matrix)
#[1] "data.frame"
矩阵

getClusters(exp = matrix)
错误于sequence.default(n..1, from = seq.int(s.1, length(df), s.1), :
'from' contains NAs
此外: 警告信息:
In sequence.default(n..1, from = seq.int(s.1, length(df), s.1), :
强制到整数范围引入的 NA

ck <- clusterData(exp = matrix,
                    cluster.method = "kmeans",
                    cluster.num = 15)
visCluster(object = ck,
           plot.type = "line")

#> visCluster(object = ck,
#+ plot.type = "line")
#Error in dplyr::arrange():
#ℹ In argument: ..2 = .data[["membership"]].
#Caused by error in .data[["membership"]]:
#! Column membership not found in .data.
#Run rlang::last_trace() to see where the error occurred.

请junjun大神解决一下,感谢

@junjunlab
Copy link
Owner

检查矩阵是否有NA,有的话替换成0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants