Performs a principal components analysis from the pca
function of the mixOmics
package.
# S3 method for default
pca(X, ncomp = 2, center = TRUE, scale = FALSE,
max.iter = 500, tol = 1e-09,…)
a numeric matrix (or data frame) which provides the data for the principal components analysis. It can contain missing values.
integer, if data is complete ncomp
decides the number of components and associated
eigenvalues to display from the pcasvd
algorithm and if the data has missing values,
ncomp
gives the number of components to keep to perform the reconstitution of the data using
the NIPALS algorithm. If NULL
, function sets ncomp = min(nrow(X), ncol(X))
a logical value indicating whether the variables should be shifted to be zero centered.
Alternately, a vector of length equal the number of columns of X
can be supplied.
The value is passed to scale
.
a logical value indicating whether the variables should be scaled to have
unit variance before the analysis takes place. The default is FALSE
for consistency with prcomp
function, but in general scaling is advisable. Alternatively, a vector of length equal the number of
columns of X
can be supplied. The value is passed to scale
.
integer, the maximum number of iterations in the NIPALS algorithm.
a positive real, the tolerance used in the NIPALS algorithm.
not used.
see pca