The function returns a list with class prcomp
containing the following components:
sdevthe 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).
rotationthe matrix of variable loadings (i.e., a matrix whose columns contain the eigenvectors). The function princomp
returns this in the element loadings
.
xif 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, scalethe centering and scaling used, or FALSE
.
txtthe component of variance of each Principal Component.