valid: #' Ensure probabilities are valid

Description Usage Arguments Details

Description

Force calculated probabilities into the range [0,1].

Usage

1
valid(x)

Arguments

x

probability

Details

Due to floating-point arithmetic, a number that should represent a probability can be calculated as being less than zero or greater than one. This function returns a value that is a valid probability.


rseedcalc documentation built on May 2, 2019, 4:49 a.m.