Transform a vector to have a different range

Share:

Description

This function takes a vector and transforms it to have a new range, given the input, or the default values of [0, 1].

Usage

1
vec.transform(x, min.val = 0, max.val = 1)

Arguments

x

the vector to transform

min.val

the minimum value of the new range

max.val

the maximum value of the new range

Value

A vector of the transformed input.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.