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

Description Usage Arguments Value Examples

View source: R/bruceR_stats_02_scale.R

Description

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

Usage

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

Arguments

v

Variable (numeric vector).

min

Minimum value (default is 0).

max

Maximum value (default is 1).

Value

A vector of rescaled variable.

Examples

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

bruceR documentation built on June 22, 2021, 1:06 a.m.