Learn R Programming

YuGene (version 1.1.6)

pca.default: Principal Components Analysis from the mixOmics package

Description

Performs a principal components analysis from the pca function of the mixOmics package.

Usage

# S3 method for default
pca(X, ncomp = 2, center = TRUE, scale = FALSE,
    max.iter = 500, tol = 1e-09,…)

Arguments

X

a numeric matrix (or data frame) which provides the data for the principal components analysis. It can contain missing values.

ncomp

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))

center

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.

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.

max.iter

integer, the maximum number of iterations in the NIPALS algorithm.

tol

a positive real, the tolerance used in the NIPALS algorithm.

not used.

Details

see pca