Description Usage Arguments Details Value Examples
Expand a range with multiplicative and additive constants
1 2 3 4 5 6 7 8 9 10 | S4ExpandRange(limits, expand = expansion())
## S4 method for signature ''NULL''
S4ExpandRange(limits, expand = expansion())
## S4 method for signature 'numeric'
S4ExpandRange(limits, expand = expansion())
## S4 method for signature 'Ranges'
S4ExpandRange(limits, expand = expansion())
|
limits |
An object indicating a range |
expand |
A |
The expand
argument consist of 4 constants that code for the
following:
A multiplicative constant relative to the width of the limits
argument to subtract from the start of the limits.
An additive constant to subtract from the start of the limits.
A multiplicative constant relative to the width of the limits
argument to add to the end of the limits.
An additive constant to add to the end of the limits.
Integer-based classes such as IRanges
and GRanges
are rounded
to the nearest integer.
An object indicating a range
1 2 3 4 5 6 7 8 9 10 11 | # Regular numeric limits
S4ExpandRange(c(10, 20), expansion(0.5, 1))
# IntegerRanges
require(IRanges)
S4ExpandRange(IRanges::IRanges(10, 20), expansion(0.5, 1))
# GenomicRanges
require(GenomicRanges)
S4ExpandRange(GenomicRanges::GRanges(c("chr1", "chr2"), c("10-20", "20-30")),
expansion(0.5, 1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.