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)))
A numerical vector with values
A numerical vector of length 2 containing the lower and upper bounds.
By default, the bounds are to the minimum and maximum values in x
.
A logical vector of length length(x)
that is used to select a
subset in x
before calculating automatic bounds.
A vector of length length(x)
.