scale_do | R Documentation |
Alternative scale using median, IQR and mad.
scale_do(x, center, scale)
x |
numeric vector |
center |
function |
scale |
function |
Function scale_do()
performs scaling according to user-specified
definition of center
and scale
.
Function scale_do()
returns a numeric vector of the same length as x
.
set.seed(1315); x = rnorm(20)
x |> scale_do(center = median, scale = mad)
x |> scale_do(center = median, scale = IQR)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.