min_max: Min-max normalization

View source: R/min-max.R

min_maxR Documentation

Min-max normalization

Description

Min-max normalization

Usage

min_max(x, lower = 0, upper = 1)

Arguments

x

A vector of 'numeric' values

lower, upper

The boundaries of the normalized score; defaults to '0' and '1', respectively. 'upper' must be greater than 'lower'.

Value

A vector of x normalizes so the lower scores is 'lower' and highest score is 'upper'

Examples

x <- c(0.34, 0.24, 0.65, 0.21, 0.18, 0.79, 0.13, 0.94, 0.22, 0.1)
min_max(x)
min_max(x, upper = 10)
min_max(x, lower = -1)
min_max(x, l = 10, u = 20)

jmbarbone/jordanExtra documentation built on Aug. 4, 2023, 5:37 p.m.