Description Usage Arguments Value Examples
Implements the Principal Component Analysis (PCA) algorithm
1 2 |
x |
An n x p matrix. |
space |
Specifies which space to do the projections. Either "row" or "column", default is "row". |
nsv |
Optional. An integer specifying the number of PCs. |
center |
If TRUE then matrix will be mean centered. Default is TRUE. |
scale |
If TRUE then matrix will be normalized. Default is FALSE |
A list of object type "pca" containing:
pc |
A matrix containing the principal components. |
loading |
A matrix containing the loadings. |
pve |
A vector containing the percent variation explained by each PC. |
1 2 3 4 5 6 | # import data
X <- matrix(rnorm(100 * 10), ncol = 10)
out_pca <- pca(X)
scree_plot(out_pca)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.