Learn R Programming

DEXiR (version 1.0.2)

lin_map: lin_map

Description

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

Usage

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

Value

numeric(). Mapped value(s).

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.

Examples

Run this code
lin_map(2, 1, 3) # 0.5

Run the code above in your browser using DataLab