【发布时间】:2019-07-17 14:27:37
【问题描述】:
我想使用 PCA,但我无法绘制它!我使用 packege 和以下代码成功运行 PCA:
pc<-prcomp(C, scale = FALSE)
summary(pc)
然后对于我使用的情节
library(devtools)
install_github("vqv/ggbiplot")
library(ggbiplot)
ggbiplot(pc)
但我收到此错误:
Error in names(df.v) <- names(df.u) :
'names' attribute [2] must be the same length as the vector [1]
【问题讨论】:
-
请记住,我们既没有您的数据也没有您的输出,因此我们无法运行您的代码,也看不到发生了什么。使用reproducible example 提供帮助会更容易