Skip to contents

Scale a vector to the range [0, 1]

Usage

scale_minmax(x)

Arguments

x

A numeric vector

Value

A numeric vector scaled to the range [0, 1]

Examples

scale_minmax(c(1, 2, 3))
#> [1] 0.0 0.5 1.0