scaler: Min-max scaling (min-max normalization).

View source: R/bruceR-stats_1_basic.R

scalerR Documentation

Min-max scaling (min-max normalization).

Description

This function resembles RESCALE() and it is just equivalent to RESCALE(var, to=0:1).

Usage

scaler(v, min = 0, max = 1)

Arguments

v

Variable (numeric vector).

min

Minimum value (defaults to 0).

max

Maximum value (defaults to 1).

Value

A vector of rescaled variable.

Examples

scaler(1:5)
# the same: RESCALE(1:5, to=0:1)


bruceR documentation built on Sept. 27, 2023, 5:06 p.m.