This function is an adapted version of the 'scale' function in R's base package. It allows the user to supply a matrix, which can then be scaled and centered. Returning the resulting centered and/or scaled matrix in a list that also contains the used scaling and centering vectors.
Usage
MetStaT.ScalePip(x.input, center = TRUE, scale = TRUE, quietly = FALSE)
Arguments
x.input
the data matrix that needs to be scaled.
center
boolean. If TRUE the data will also be centered per column (the mean of each column will become zero).
scale
this argument defines which type of scaling is to be applied. With the default value of TRUE, the data is autoscaled. When set to "pareto", pareto scaling is applied.
quietly
boolan. If TRUE, no intermediate text output concerning the centering and scaling methods is returned.
Value
A list is returned containing the following values:
data
The scaled and/or scaled data.
description
A string that contains a description on the centering and/or scaling methods used.
center.vector
The centering vector applied to the original data.