2
我想用ggbiplot來繪製PCA結果,我如何繪製補充變量? 我發現this discussion馬華的結果,但我想有箭頭,以及...ggbiplot中的補充變量PCA
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]'