Produces major breaks for use on plot axes.

S4BreaksMajor(x, n = 5L, ...)

# S4 method for numeric
S4BreaksMajor(x, n = 5L, ...)

# S4 method for GRanges
S4BreaksMajor(x, n = 5L, ...)

Arguments

x

A object describing the range of values

n

A desired number of breaks

...

Arguments passed to downstream functions

Value

A vector with major breaks positions

Details

The downstream function that arguments are typically passed to is the extended function, except when ranges are given as GenomicRanges.

Examples

# For simple numerics S4BreaksMajor(c(0, 12))
#> [1] 0 3 6 9 12
# Gives GPos extremes for GRanges require(GenomicRanges)
#> Loading required package: GenomicRanges
#> Loading required package: IRanges
#> Loading required package: GenomeInfoDb
S4BreaksMajor(GRanges(c("chr1:100-200", "chr2:140-260")))
#> <WoodenHorse: UnstitchedGPos[4]> #> [1] chr1:100 chr1:200 chr2:140 chr2:260