rescaling {tidyindex} | R Documentation |
The rescaling module
Description
The rescale module changes the scale of the variable(s) using one of the
available rescaling functions: rescale_zscore()
,
rescale_minmax()
, and rescale_center
.
Usage
rescaling(data, ...)
rescale_zscore(var, na.rm = TRUE)
rescale_minmax(var, min = NULL, max = NULL, na.rm = TRUE, censor = TRUE)
rescale_center(var, na.rm = TRUE)
Arguments
data |
an index table object, see [tidyindex::init()] |
... |
used in |
var |
the variable(s) to rescale, accept tidyselect syntax |
na.rm |
used in |
min , max |
used in |
censor |
used in |
Value
an index table object
Examples
dt <- hdi |> init()
dt |> rescaling(life_exp = rescale_zscore(life_exp))
dt |> rescaling(life_exp2 = rescale_minmax(life_exp, min = 20, max = 85))
[Package tidyindex version 0.1.0 Index]