Description Usage Arguments Value See Also Examples
View source: R/maths_functions.R
Transforms a given value from the scale of min-max to 0-1, either directly from a linear scale or via a log scale
1 | toUnitScale1(y, min = 1, max = 100, logflag = FALSE, logbase = 10)
|
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 |
numeric value with the converted input
fromUnitScale
inverse function
1 2 | toUnitScale(65,20,80)
toUnitScale(15,0,16,TRUE,10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.