Skip to contents

Normalizes with min-max

Usage

minmax_scaling(x, na.rm = TRUE)

Arguments

x

Input variable

na.rm

If TRUE missing values are removed before calculation

Value

If x is a numeric variable return (x - min(x)) / (max(x) - min(x))

Examples

x <- data$Total_Power
x_minmax <- minmax_scaling(x)
head(x)
#> [1] 184.8 162.4 186.8 164.8 179.6 175.2