Description Usage Arguments Value Examples
Coerces numbers outside the specified range to the min or max value. low and high arguments default to '-Inf' and 'Inf' Function will return NULL if lower
1 | num_squeeze(x, low = -Inf, high = Inf)
|
x |
vector of numeric values |
low |
lower limit of numeric range |
high |
upper limit of numeric range |
numeric vector
1 2 3 4 5 6 7 | x = -100:100
num_squeeze(x)
num_squeeze(x, low = 0)
num_squeeze(x, low = -1e3, high = 1e3)
num_squeeze(x, low = -2, high = -5) #returns NULL with warning
num_squeeze(x, low = 0, high = 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.