clamp {liminal} | R Documentation |
Rescale all columns of a matrix
clamp(.data)
clamp_robust(.data)
clamp_sd(.data, sd = 1)
clamp_standardize(.data, sd = 1)
.data |
A numeric matrix |
sd |
the value of each columns standard deviation (default is 1) |
These functions are used internally by the tour to rescale all
columns of .data
.
clamp()
rescales so all values for each column lie in the unit interval
clamp_robust()
rescales by first centering by the median and then scaling
by the median absolute deviation.
clamp_sd()
rescales all columns to have a fixed standard deviation.
clamp_standardize()
rescales all columns to have zero mean and unit variance.
A matrix with the same dimension as .data
where each column has
been rescaled.
mv <- matrix(rnorm(30), ncol = 3)
clamp(mv)
clamp_robust(mv)
clamp_sd(mv)
clamp_standardize(mv)