proportionize {SimTimeVar} | R Documentation |
Turn a number into a valid proportion
Description
An internal function not intended for the user. Turns an arbitrary number into a valid proportion by setting the number equal to the closest value in [0,1].
Usage
proportionize(x, zero = 1e-05, one = 0.999)
Arguments
x |
The number to be turned into a proportion. |
zero |
A very small number that is just larger than 0. |
one |
A number that is just smaller than 1. |
Examples
proportionize(-0.03)
proportionize(1.2)
proportionize(.63)
[Package SimTimeVar version 1.0.0 Index]