Run Principal Components Analysis (PCA).
run_pca( mat, transpose = TRUE, center = TRUE, scale. = FALSE, rank. = NULL, ... )
| mat | Matrix to run PCA on. |
|---|---|
| transpose | Whether to transpose the matrix first. |
| center | a logical value indicating whether the variables
should be shifted to be zero centered. Alternately, a vector of
length equal the number of columns of |
| scale. | a logical value indicating whether the variables should
be scaled to have unit variance before the analysis takes
place. The default is |
| rank. | optionally, a number specifying the maximal rank, i.e.,
maximal number of principal components to be used. Can be set as
alternative or in addition to |
| ... | Additional parameters passed to prcomp. |
Uses prcomp.