Skip to contents

An internal function for range conversion. For each element in x, it returns the distance to the minimal values and divided by the range.

Usage

convert_range(x)

Arguments

x

A vector of numbers.

Value

A vector calculated by (x - min(x)) / (max(x) - min(x))

Examples

convert_range(5:10)
#> [1] 0.0 0.2 0.4 0.6 0.8 1.0