toUnitScale1: toUnitScale

Description Usage Arguments Value See Also Examples

View source: R/maths_functions.R

Description

Transforms a given value from the scale of min-max to 0-1, either directly from a linear scale or via a log scale

Usage

1
toUnitScale1(y, min = 1, max = 100, logflag = FALSE, logbase = 10)

Arguments

y

numeric value to be transformed

min

the bottom of the linear scale. Defaults to 1

max

the top of the linear scale. Defaults to 100

logflag

Optional flag to convert to a unit scale via the log scale. Defaults to FALSE

logbase

Optional numeric value to be used as the base for the log scale

Value

numeric value with the converted input

See Also

fromUnitScale inverse function

Examples

1
2
toUnitScale(65,20,80)
toUnitScale(15,0,16,TRUE,10)

jameshay218/mcmcJH documentation built on May 18, 2019, 11:20 a.m.