normalize: Normalize (scale) numeric vector or matrix to any range

Description Usage Arguments Value See Also Examples

Description

Take a numeric vector or matrix and scale it to a new range.

Usage

1
normalize(x, new_min = 0, new_max = 1)

Arguments

x

A numeric vector or matrix

new_min

The new min value for the input

new_max

The new max value for the input

Value

A matrix or vector with values normalized to the given range.#'

See Also

scale

Examples

1
normalize(1:10, new_min = -10, new_max = -9)#'

jolars/motley documentation built on May 19, 2019, 7:25 p.m.