powered by
Alternative scale using median, IQR and mad.
scale_do(x, center, scale)
Function scale_do() returns a numeric
scale_do()
vector of the same length as x.
x
numeric vector
function
Function scale_do() performs scaling according to user-specified definition of center and scale.
center
scale
set.seed(1315); x = rnorm(20) x |> scale_do(center = median, scale = mad) x |> scale_do(center = median, scale = IQR)
Run the code above in your browser using DataLab