I would like to produce some nice PCA plots in R. As usual, in R, there are several ways to perform a principal component analysis. I found so far 3 different ways of how to calculate your components and 3 ways of plotting them. I was wondering whether people who are familiar with these functions can give me some advise on the best combination of functions to produce the following plots:
- Scores Plot
- Loadings Plot
- Histogram / Bar chart of the variances explained by each principal component
My research on functions and plots used for PCA in R resulted in:
Functions:
- pca.xzy()
- prcomp()
- princomp()
- dudi.pca()
Plot:
- plot.pca (this one seems to belong to the function pca.xzy())
- ggplot2
- plot
- biplot
I also found the following webpage:
http://pbil.univ-lyon1.fr/ade4/ade4-html/dudi.pca.html
And I was wondering if you can draw those circles and lines starting from each of the circle centers with one of the other functions mentioned above as the function dudi.pca from the ade4 package seems to be the most complicated one.