svdPca {pcaMethods}R Documentation

Perform principal component analysis using singular value decomposition

Description

A wrapper function for R's standard function prcomp. Delivers the result as a pcaRes method for compatibility with the rest of the pcaMethods package.

Usage

svdPca(Matrix, nPcs=2, center=TRUE, completeObs=FALSE, varLimit=1,...)

Arguments

Matrix Numerical matrix samples in rows and variables as columns.
nPcs Number of components that should be extracted.
center Center the data column wise if TRUE
completeObs Return the complete observations. This exisits for compatibility only, as svdPca cannot missing values. If set TRUE the input matrix will be returned in the completeObs field.
varLimit Optionally the ratio of variance that should be explained. nPcs is ignored if varLimit < 1
... Only used for passing through arguments.

Details

svdPca can preferrably be called using pca(object, method="svd").

Value

A pcaRes object.

Author(s)

Henning Redestig

See Also

prcomp, princomp, pca

Examples

data(iris)
pcIr <- svdPca(iris[,1:4], nPcs=2)

[Package pcaMethods version 1.2.3 Index]