prep {pcaMethods} | R Documentation |
Implements simple preprocessing alternatives for scaling a matrix.
prep(object, scale=c("none", "pareto", "vector", "UV"), center=TRUE, ...)
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. |
Does basically the same as scale
but adds some
alternative scaling options.
A matrix with attribute "scaled:center" if centring was done.
Wolfram Stacklies, Henning Redestig
object <- matrix(rnorm(50), nrow=10) object <- prep(object, scale="vector", center=TRUE)