squish: Squish into a range
Description
Squish into a range
Usage
squish(x, a, b, in_place = FALSE)
Value
A numeric/integer vector with the values of x "squished" between a
and b; values above b
replaced with b and values below a replaced with a.
Arguments
- x
A numeric vector.
- a, b
Upper and lower bounds
- in_place
(logical, default: FALSE) Should the function operate on x in place?