What is the difference between R functions prcomp and princomp? I compared ?prcomp and ?princomp and found something about Q-mode and R-mode principal component analysis (PCA). But honestly – I don't understand it. Can anybody explain the difference and maybe even explain when to apply which?
 A: A useful and specific documentation from Gregory B. Anderson, titled PRINCIPAL COMPONENT ANALYSIS IN R AN EXAMINATION OF THE DIFFERENT FUNCTIONS AND METHODS TO PERFORM PCA has given more information on this topic. Updated link (7 Jan 2021).
The following two paragraph were extracted from the introduction:

In R there are two general methods to perform PCA without any missing values: (1) spectral decomposition (R-mode [also known as eigendecomposition]) and (2) singular value decomposition (Q-mode; R Development Core Team 2011). Both of these methods can be performed longhand using the functions eigen (R-mode) and svd (Q-mode), respectively, or can be performed using the many PCA functions found in the stats package and other additional available packages. The spectral decomposition method of analysis examines the covariances and correlations between variables, whereas the singular value decomposition method looks at the covariances and correlations among the samples. While both methods can easily be performed within R, the singular value decomposition method (i.e., Q-mode) is the preferred analysis for numerical accuracy (R Development Core Team 2011).
This document focuses on comparing the different methods to perform PCA in R and provides appropriate visualization techniques to examine normality within the statistical package. More specifically this document compares six different functions either created for or can be used for PCA: eigen, princomp, svd, prcomp, PCA, and pca. Throughout the document the essential R code to perform these functions is embedded within the text using the font Courier New and is color coded using the technique provided in Tinn-R (https://sourceforge.net/projects/tinn-r). Additionally, the results from the functions are compared using simulation procedure to see if the different methods differ in the eigenvalues, eigenvectors, and scores provided from the output.

A: The difference between them is nothing to do with the type of PCA they perform, just the method they use. As the help page for prcomp says:

The calculation is done by a singular value decomposition of the (centered and possibly scaled) data matrix, not by using eigen on the covariance matrix. This is generally the preferred method for numerical accuracy.

On the other hand, the princomp help page says:

The calculation is done using eigen on the correlation or covariance matrix, as determined by cor. This is done for compatibility with the S-PLUS result. A preferred method of calculation is to use svd on x, as is done in prcomp."

So, prcomp is preferred, although in practice you are unlikely to see much difference (for example, if you run the examples on the help pages you should get identical results).
A: Usually a multivariate analysis (computing correlations, extracting latents, etc.) is done of data columns which are features or questions, - while sample units, the rows, are respondents. Hence this way is called R way analysis. Sometimes, though, you may want to do multivariate analysis of responsents, while questions are treated as sample units. That would be Q way analysis.
There is no formal difference between the two, so you can manage both with the same function, only transpose your data. There are differences, however, in issues of standardization and results interpretation.
This is a general reply: I don't touch specifically the R functions prcomp and princomp because I'm not an R user and am not aware of possible differences between them.
