Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

var_scale

Variable Scaling


Description

scaling variables using standardization or normalization

Usage

var_scale(dt, var_skip = NULL, type = "standard", ...)

Arguments

dt

a data frame or vector

var_skip

Name of variables that will skip for scaling Defaults to NULL.

type

type of scaling method, including standard or minmax.

...

Additional parameters.

Examples

data("germancredit")

# standardization
dts1 = var_scale(germancredit, type = 'standard')

# normalization/minmax
dts2 = var_scale(germancredit, type = 'minmax')
dts2 = var_scale(germancredit, type = 'minmax', new_range = c(-1, 1))

scorecard

Credit Risk Scorecard

v0.3.2
MIT + file LICENSE
Authors
Shichen Xie [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.