
Last chance! 50% off unlimited learning
Sale ends in
Performs feature scaling such as Z-score and min-max scaling.
scaler(x, scale = c("minmax", "zscore"), col = "auto",
par1 = NULL, par2 = NULL, na.rm = FALSE)
transformed version of x
.
a numerical vector
, a matrix
or a data.frame
.
a transfer for x
.
a character vector of column names or indices. If "auto"
, all numeric columns will be transformed. If "all"
, all columns will be transformed.
a numerical value or vector that for the case scale = "minmax"
indicating the maximum value(s) and for the case scale = "zscore"
indicating the mean value(s).
a numerical value or vector that for the case scale = "minmax"
indicating the maximum value(s) and for the case scale = "zscore"
indicating the sd value(s).
a logical value indicating whether NA values in x
should be stripped before the computation proceeds.
Reza Mohammadi a.mohammadi@uva.nl and Kevin Burke kevin.burke@ul.ie
zscore
, minmax
x = c(2.3, -1.4, 0, 3.45)
scaler(x, scale = "minmax")
scaler(x, scale = "zscore")
Run the code above in your browser using DataLab