Description Usage Arguments Details Examples
This is an efficient C++ implementation of range for numeric vectors: it avoids S3 dispatch, and computes both min and max in a single pass through the input.
1 |
x |
a numeric vector, or a |
finite |
If |
If x
has a range
attribute (e.g. it's a ranged
object), it will be used instead of computing the range from scratch.
1 2 3 4 5 6 | x <- runif(1e6)
system.time(range(x))
system.time(frange(x))
rx <- ranged(x)
system.time(frange(rx))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.