powered by
Compute the directions of maximal variance in a data matrix using the Singular Value Decomposition (SVD).
pca( X, ncomp = min(dim(X)), preproc = center(), method = c("fast", "base", "irlba", "propack", "rsvd", "svds"), ... )
A bi_projector object containing the PCA results.
bi_projector
The data matrix.
The number of requested components to estimate (default is the minimum dimension of the data matrix).
The pre-processing function to apply to the data matrix (default is centering).
The SVD method to use, passed to svd_wrapper (default is "fast").
svd_wrapper
Extra arguments to send to svd_wrapper.
svd_wrapper for details on SVD methods.
data(iris) X <- as.matrix(iris[, 1:4]) res <- pca(X, ncomp = 4) tres <- truncate(res, 3)
Run the code above in your browser using DataLab