Learn R Programming

tidyindex (version 0.1.0)

variable_trans: 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)

Value

an index table object

Arguments

data

an index table object

...

an variable transformation recipe of class var_trans, created by trans_* function, the transformation recipe to be evaluated

var

used in trans_* functions, the variable to be transformed

Examples

Run this code
hdi |> init() |> variable_trans(gni_pc = trans_log10(gni_pc))

Run the code above in your browser using DataLab