variable_trans {tidyindex} | R Documentation |
The variable transformation module
Description
The variable transformation module is used to transform a single variable
in the index table object. The transformation is specified by a variable
transformation object of class var_trans
, created by
trans_*
functions. Currently, the following transformation functions
are supported: trans_log10
, trans_quadratic
,
trans_square_root
, and trans_cubic_root
.
Usage
variable_trans(data, ...)
trans_log10(var)
trans_quadratic(var)
trans_square_root(var)
trans_cubic_root(var)
Arguments
data |
an index table object |
... |
an variable transformation recipe of class |
var |
used in |
Value
an index table object
Examples
hdi |> init() |> variable_trans(gni_pc = trans_log10(gni_pc))
[Package tidyindex version 0.1.0 Index]