Truncate the values of a vector between a lower and an upper limit.
Arguments
- x
numeric. A vector of values to be truncated.
- a
numeric. The lower truncation limit.
- b
numeric. The upper truncation limit.
Value
A vector with the same dimensions as x
.
Examples
if (FALSE) {
x <- 1:10
trunc_minmax(x, 2, 7)
}