Returns a vector containing the minimum and maximum of all the given arguments.

S4Range(x, ..., na.rm = FALSE, finite = FALSE, aes = "z")

# S4 method for knownContinuous
S4Range(x, ..., na.rm = FALSE, finite = FALSE, aes = "z")

# S4 method for Rle
S4Range(x, ..., na.rm = FALSE, finite = FALSE, aes = "z")

# S4 method for Ranges
S4Range(x, ..., na.rm = FALSE, finite = FALSE, aes = "z")

# S4 method for GenomicRanges
S4Range(x, ..., na.rm = FALSE, finite = FALSE, aes = "z")

# S4 method for WoodenHorse
S4Range(x, ..., na.rm = FALSE, finite = FALSE, aes = "z")

Arguments

x

An object to determine the range of.

...

Optionally, more objects of the same class as x to include in the range calculation.

na.rm

logical of length 1: omit NA values prior to calculating ranges?

finite

logical of length 1: omit non-finite elements prior to calculating ranges?

aes

An aesthetic for which to evaluate the function.

Value

A vector indicating lower- and upper-bounds of the input.

Details

Defaults to the range function.

Examples

# For regular numeric vectors S4Range(c(1:3, -1))
#> [1] -1 3
# GenomicRanges returns same type require(GenomicRanges) S4Range(GRanges(c("chr1:100-200", "chr2:200-300", "chr2:500-600")))
#> GRanges object with 2 ranges and 0 metadata columns: #> seqnames ranges strand #> <Rle> <IRanges> <Rle> #> [1] chr1 100-200 * #> [2] chr2 200-600 * #> ------- #> seqinfo: 2 sequences from an unspecified genome; no seqlengths