squish

0th

Percentile

Squish values into range.

Squish values into range.

Usage
squish(x, range = c(0, 1), only.finite = TRUE)
Arguments
x
numeric vector of values to manipulate.
range
numeric vector of length two giving desired output range.
only.finite
if TRUE (the default), will only modify finite values.
Aliases
  • squish
Examples
squish(c(-1, 0.5, 1, 2, NA))
squish(c(-1, 0, 0.5, 1, 2))
Documentation reproduced from package scales, version 0.2.0, License: MIT

Community examples

Looks like there are no examples yet.