vreScaleNumber: Rescale a number from one range into another range.

View source: R/valueRangeExpression.R

vreScaleNumberR Documentation

Rescale a number from one range into another range.

Description

vreScaleNumber takes a value from one range and scales it proportionally into another range.

Usage

vreScaleNumber(n1, n2, vMin, vMax, value, decimalPlaces = 3)

Arguments

n1

The lower value of the target range.

n2

The upper value of the target range.

vMin

The lower value of the source range.

vMax

The upper value of the source range.

value

The source value to rescale into the target range.

decimalPlaces

The number of decimal places to round the result to.

Value

The value rescaled into the target range.


pivottabler documentation built on Oct. 1, 2023, 5:07 p.m.