prcomp vs. pca - fix prop. var. explained in pca()

Issue #134 resolved
Amrit Singh created an issue

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)

  1. Florian Rohart

    The correct results can be already found in pc_pca$explained_variance. It's an error in the print.pca function.

    Thanks for reporting!

  2. Florian Rohart

    actually it's in the summary.pca, not the print.pca (the print is fine)

    Will be fixed in the next release

  3. Log in to comment