View source: R/generic_functions.R
pca | R Documentation |
This is a generic function to call PCA on various objects. The default method
uses stats::prcomp()
.
pca(object, TVE = 1, ...)
## Default S3 method:
pca(object, ...)
## S3 method for class 'dfts'
pca(object, TVE = 1, ...)
object |
Object for computation of principle components analysis. |
TVE |
Numeric in [0,1] for the total variance explained, this determines the number of components and can be used for dimension reduction. |
... |
Additional parameters to extensions based on data. Often this is
additional information for |
Principal component data. Note that the scores are in x and the eigenfuctions in rotation. This is to keep consistency between existing pca methods in R, but may change in the future.
pca(1:10)
pca(electricity)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.