powered by
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].
proportionize(x, zero = 1e-05, one = 0.999)
The number to be turned into a proportion.
A very small number that is just larger than 0.
A number that is just smaller than 1.
# NOT RUN { proportionize(-0.03) proportionize(1.2) proportionize(.63) # }
Run the code above in your browser using DataLab