Description Usage Arguments Value Examples
This function performs a principal component analysis on a numerical data matrix.
1 |
x |
input data matrix or data frame (numerical) |
center |
zero center the data (logical value, default is TRUE) |
scale |
scale the data to unit variance before analysis (logical value, default is FALSE) |
svd |
indicate whether to perform single value decomposition (logical value, default is TRUE), otherwise perform eigen decomposition |
run.pca
returns a list with the following elements:
Data - a preview of the input data matrix
k - the number of observations in the dataset
PCs - the matrix of loadings containing the principal components as columns (eg, eigenvectors)
sdev - standard deviations of the principal components (uses singular values of the matrix if using singular value decomposition, but takes the square root of the eigenvalues of the correlation matrix if using spectral decomposition)
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.