frange: Efficient implementation of range.

Description Usage Arguments Details Examples

View source: R/RcppExports.R

Description

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.

Usage

1

Arguments

x

a numeric vector, or a ranged object

finite

If TRUE ignores missing values and infinities. Note that if the vector is empty, or only contains missing values, frange will return c(Inf, -Inf) because those are the identity values for min and max respectively.

Details

If x has a range attribute (e.g. it's a ranged object), it will be used instead of computing the range from scratch.

Examples

1
2
3
4
5
6

hadley/bigvis documentation built on May 17, 2019, 9:45 a.m.