svdPca {pcaMethods} | R Documentation |
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.
It is not recommended to use this function directely but rather to use the pca() wrapper function.
svdPca(Matrix, nPcs=2, center=TRUE, completeObs=FALSE, varLimit=1,...)
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. |
svdPca can preferrably be called using pca(object, method="svd")
.
A pcaRes
object.
Henning Redestig
prcomp
, princomp
, pca
data(iris) pcIr <- svdPca(iris[,1:4], nPcs=2)