Learn R Programming

parameters (version 0.2.0)

normalize: Normalization

Description

Performs a normalization of data. This scales all numeric variables in the range 0 - 1.

Usage

normalize(x, ...)

# S3 method for numeric normalize(x, include_bounds = TRUE, verbose = TRUE, ...)

# S3 method for grouped_df normalize(x, select = NULL, exclude = NULL, include_bounds = TRUE, ...)

# S3 method for data.frame normalize(x, select = NULL, exclude = NULL, include_bounds = TRUE, ...)

Arguments

x

Object.

...

Arguments passed to or from other methods.

include_bounds

Logical, if TRUE, return value may include 0 and 1. If FALSE, the return value is compressed, using the formula (x * (n - 1) + 0.5) / n (Smithson and Verkuilen 2006), to avoid zeros and ones in the normalized variables. This can be useful in case of beta-regression, where the response variable is not allowed to include zeros and ones.

verbose

Toggle warnings on or off.

select

For a data frame, character vector of column names to be standardized. If NULL (the default), all variables will be standardized.

exclude

For a data frame, character vector of column names to be excluded from standardization.

Value

A normalized object.

References

Smithson M, Verkuilen J (2006). A Better Lemon Squeezer? Maximum-Likelihood Regression with Beta-Distributed Dependent Variables. Psychological Methods, 11(1), 54<U+2013>71.