lin_map {DEXiR}R Documentation

lin_map

Description

Map value x linearly from interval ⁠[imin:imax]⁠ to ⁠[omax:omax]⁠.

Usage

lin_map(x, imin, imax, omin = 0, omax = 1)

Arguments

x

numeric(). Value(s) to be mapped.

imin

numeric(). Lower bound of the input range.

imax

numeric(). Upper bound of the input range.

omin

numeric(). Lower bound of the output range.

omax

numeric(). Upper bound of the output range.

Value

numeric(). Mapped value(s).

Examples

lin_map(2, 1, 3) # 0.5

[Package DEXiR version 1.0.2 Index]