This function replaces any values in x that are lower than
bounds[1] by bounds[1], and replaces any values higher
than bounds[2] by bounds[2].
squeeze(x, bounds = c(min(x[r]), max(x[r])), r = rep.int(TRUE, length(x)))
| x | A numerical vector with values |
|---|---|
| bounds | A numerical vector of length 2 containing the lower and upper bounds.
By default, the bounds are to the minimum and maximum values in |
| r | A logical vector of length |
A vector of length length(x).
Stef van Buuren, 2011.