prcomp vs. pca - fix prop. var. explained in pca()
Issue #134
resolved
X <- matrix(rnorm(32000), 1000, 32) pc_prcomp <- stats::prcomp(X, scale. = TRUE, center = TRUE, rank. = 2) pc_pca <- mixOmics::pca(X, scale = TRUE, center = TRUE, ncomp = 2) summary(pc_prcomp); summary(pc_pca)
Comments (3)
-
-
actually it's in the summary.pca, not the print.pca (the print is fine)
Will be fixed in the next release
-
- changed status to resolved
commit 21166e7
- Log in to comment
The correct results can be already found in pc_pca$explained_variance. It's an error in the print.pca function.
Thanks for reporting!