Function for updating the scale range given a new and existing range.
S4Train(new, existing = NULL, drop = FALSE, na.rm = FALSE, ..., aes = "z") # S4 method for `NULL`,ANY S4Train(new, existing = NULL, drop = FALSE, na.rm = FALSE, ..., aes = "z") # S4 method for WoodenHorse,ANY S4Train(new, existing = NULL, drop = FALSE, na.rm = FALSE, ..., aes = "z") # S4 method for ANY,ANY S4Train(new, existing = NULL, drop = FALSE, na.rm = FALSE, ..., aes = "z") # S4 method for knownDiscretes,knownDiscretes_OR_missing S4Train(new, existing = NULL, drop = FALSE, na.rm = FALSE, ..., aes = "z") # S4 method for IntegerRanges,numeric_OR_missing S4Train(new, existing = NULL, drop = FALSE, na.rm = FALSE, ..., aes = "z") # S4 method for GenomicRanges,GRanges_OR_missing S4Train(new, existing = NULL, drop = FALSE, na.rm = FALSE, ..., aes = "z") # S4 method for Rle,ANY S4Train(new, existing = NULL, drop = FALSE, na.rm = FALSE, aes = "z") # S4 method for Factor,ANY S4Train(new, existing = NULL, drop = FALSE, na.rm = FALSE, aes = "z")
new | An object representing the current range |
---|---|
existing | An object representing the new range |
drop | When |
na.rm | When |
... | Arguments passed down to downstream methods. Currently used for discrete scales. |
aes | An aesthetic for which to evaluate the range |
An updated representation of a range
#> [1] -15 10# IRanges return plain limits require(IRanges) S4Train(new = IRanges("2501-2900"), existing = c(2000, 2500))#> [1] 2000.0 2900.5# For GenomicRanges require(GenomicRanges) S4Train(new = GRanges(c("chr1:100-200", "chr2:1-2")), existing = GRanges(c("chr2:200-300")))#> GRanges object with 2 ranges and 0 metadata columns: #> seqnames ranges strand #> <Rle> <IRanges> <Rle> #> [1] chr1 100-200 * #> [2] chr2 1-300 * #> ------- #> seqinfo: 2 sequences from an unspecified genome; no seqlengths