This function follows the squish_infinite
function, but allows extentions that work with other objects than numeric
vectors.
squish_infiniteThis(x, range = NULL, aes = "z") # S4 method for numeric,numeric_OR_missing squish_infiniteThis(x, range = c(0, 1), aes = "z") # S4 method for Rle,numeric_OR_missing squish_infiniteThis(x, range = c(0, 1), aes = "z") # S4 method for WoodenHorse,numeric_OR_missing squish_infiniteThis(x, range = c(0, 1), aes = "z")
x | A vector of values to manipulate. |
---|---|
range | A range representing object. |
aes | An aesthetic for which to evaluate the function. |
The x
argument, but with infinite values squished to the
range.
#> [1] 0 -1 0 1 2 1#> numeric-Rle of length 10 with 4 runs #> Lengths: 1 2 3 4 #> Values : 3 2 3 2