prep {pcaMethods}R Documentation

Preprocess a matrix for PCA

Description

Implements simple preprocessing alternatives for scaling a matrix.

Usage

prep(object, scale=c("none", "pareto", "vector", "UV"), center=TRUE, ...)

Arguments

object Numerical matrix with (or an object coercible to such) with samples in rows and variables as columns. Also takes exprSet in which case the transposed exprs slot is used.
center Indicates if the matrix should be mean centred or not.
scale One of "UV" (unit variance a=a/σ_{a}) "vector" (vector normalisation b=b/||b||), "pareto" or "none" to indicate which scaling should be used to scale the matrix with a variables and b samples.
... Only used for passing through arguments.

Details

Does basically the same as scale but adds some alternative scaling options.

Value

A matrix with attribute "scaled:center" if centring was done.

Author(s)

Wolfram Stacklies, Henning Redestig

See Also

scale

Examples

object <- matrix(rnorm(50), nrow=10)
object <- prep(object, scale="vector", center=TRUE)

[Package pcaMethods version 1.14.0 Index]