As discussed in other posts i had issues with MixOmics 6.17.28. So Im Running RStudio with R version 4.1.0 and MixOmics 6.16.3.
I was following the PCA vignette 3. On section 3.7.1 sPCA the plotIndiv showed PC1 and PC 2 both displayed at 0% see the image.
When i checked the values for: MyResult.spca the numerical results did not match the plot in 3.7.1 either:
# sparse PCA with 3 principal components. # Input data X of dimensions: 64 3116 # Number of selected variables on each prinicipal components: # PC1 PC2 PC3 # 15 10 5 # Proportion of adjusted explained variance for the first 3 principal components, see object$prop_expl_var: # PC1 PC2 PC3 # 0.003856574 0.002213243 0.001108384 # # Other available components: # # loading vectors: see object$rotation # Other functions: # # tune.spca, plotIndiv, plot, plotVar, selectVar, biplot
Although sPCA plot labels do not display correctly the
plotLoadings(MyResult.spca, comp=1) plotted perfectly
On Section 3.8
Tune.pca(x) did not cause the plot shown in the vignette.