range_noinf {tern} | R Documentation |
Re-implemented range()
default S3 method for numerical objects
Description
This function returns c(NA, NA)
instead of c(-Inf, Inf)
for zero-length data
without any warnings.
Usage
range_noinf(x, na.rm = FALSE, finite = FALSE)
Arguments
x |
( |
na.rm |
( |
finite |
( |
Value
A 2-element vector of class numeric
.
Examples
x <- rnorm(20, 1)
range_noinf(x, na.rm = TRUE)
range_noinf(rep(NA, 20), na.rm = TRUE)
range(rep(NA, 20), na.rm = TRUE)
[Package tern version 0.9.9 Index]