squish {scales} | R Documentation |
Squish values into range.
squish(x, range = c(0, 1), only.finite = TRUE)
x |
numeric vector of values to manipulate. |
range |
numeric vector of length two giving desired output range. |
only.finite |
if |
Homer Strong homer.strong@gmail.com
squish(c(-1, 0.5, 1, 2, NA)) squish(c(-1, 0, 0.5, 1, 2))