| squish {hutilscpp} | R Documentation |
Squish into a range
Description
Squish into a range
Usage
squish(x, a, b, in_place = FALSE)
Arguments
x |
A numeric vector. |
a, b |
Upper and lower bounds |
in_place |
(logical, default: |
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.
Examples
squish(-5:5,-1L, 1L)
[Package hutilscpp version 0.10.5 Index]