Description Usage Arguments Value Examples
Defined as the difference between the maximum and the minimum. Equivalent to
base R code diff(range(x))
, but much faster.
1 | true_range_i(x)
|
x |
Integer vector or matrix. |
Integer value.
1 2 3 4 | # In general, true_range_i is much faster than diff(range(x))
x <- rpois(1000, lambda = 5)
all.equal(diff(range(x)), true_range_i(x))
benchmark(diff(range(x)), true_range_i(x), replications = 5000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.