Constrain vector to be inside interval
Usage
constrain_interval(x, lower = 0, upper = 1, verbose = TRUE)
Arguments
- x
A vector.
- lower
The smallest possible value of `x`.
- upper
The largest possible value of `x`.
Value
A vector `x` where values outside the interval are moved inside.