Performs a principal components analysis on the given data matrix and returns the results as an object of class "prcomp".
Usage
pca(x, ...)
Value
The function returns a list with class prcomp containing the following components:
sdev
the standard deviations of the principal components (i.e., the square roots of the eigenvalues of the covariance/correlation matrix, though the calculation is actually done with the singular values of the data matrix).
rotation
the matrix of variable loadings (i.e., a matrix whose columns contain the eigenvectors). The function princomp returns this in the element loadings.
x
if retx is TRUE the value of the rotated data (the centred (and scaled if requested) data multiplied by the rotation matrix) is returned. Hence, cov(x) is the diagonal matrix diag(sdev^2). For the formula method, napredict() is applied to handle the treatment of values omitted by the na.action.
center, scale
the centering and scaling used, or FALSE.
txt
the component of variance of each Principal Component.
Pearson, K
On Lines and Planes of Closest Fit to Systems of Points in Space. Philosophical Magazine 1901;2 (11): 559-572. doi:10.1080/14786440109462720. Link