Scale(X, type = c("standardize", "normalize", "none"))
Arguments
X
A numeric matrix.
type
The scaling type. See details.
Value
A scaled numeric matrix.
Details
This function is similar to scale in base package, but it can also
normalize the columns of a matrix. Suppose $x$ is one of the columns
in matrix X. The "standardize" is defined as
$$standardize = (x - mean(x))/sd(x)$$
and the "normalize" is defined as
$$normalize = (x - min(x))/(max(x) - min(x)).$$
The "none" is just to keep the original values. It is designed for the
grpss function in purpose.