pca {multivarious} | R Documentation |
Principal Components Analysis (PCA)
Description
Compute the directions of maximal variance in a data matrix using the Singular Value Decomposition (SVD).
Usage
pca(
X,
ncomp = min(dim(X)),
preproc = center(),
method = c("fast", "base", "irlba", "propack", "rsvd", "svds"),
...
)
Arguments
X |
The data matrix. |
ncomp |
The number of requested components to estimate (default is the minimum dimension of the data matrix). |
preproc |
The pre-processing function to apply to the data matrix (default is centering). |
method |
The SVD method to use, passed to |
... |
Extra arguments to send to |
Value
A bi_projector
object containing the PCA results.
See Also
svd_wrapper
for details on SVD methods.
Examples
data(iris)
X <- as.matrix(iris[, 1:4])
res <- pca(X, ncomp = 4)
tres <- truncate(res, 3)
[Package multivarious version 0.2.0 Index]