我正在尝试用 ggbiplot 绘制 PCA 结果,如何绘制补充变量?我找到了关于 MCA 结果的讨论,但我也想要箭头......
data(wine)
wine.pca <- PCA(wine, scale. = TRUE, quanti.sup = c(4,5))
plot(wine.pca)
ggbiplot(wine.pca)
此外,这段代码给了我一个错误:
1: In sweep(pcobj$ind$coord, 2, 1/(d * nobs.factor), FUN = "*") :
STATS is longer than the extent of 'dim(x)[MARGIN]'
2: In sweep(v, 2, d^var.scale, FUN = "*") :
STATS is longer than the extent of 'dim(x)[MARGIN]'