Skip to contents

This function rescales a numeric vector between new min and new max, conserving 0 or not

Usage

run_rescale(values, new_min = -1, new_max = 1, keep_zero = FALSE)

Arguments

values

VECTOR : a numeric vector to rescale (no default)

new_min

NUMERIC : new minimum (default to -1)

new_max

NUMERIC : new maximum (default to 1)

keep_zero

LOGICAL : whether to keep zero as zero or not (default to FALSE)

Value

Return a vector with rescaled numeric values