Description Usage Arguments Details Value Functions Examples
This is typically the last step when a geom requests a coordinate system to transform the data values between a numeric range between 0 and 1.
1 | S4ForceFlat(x, limits = NULL, aes = "z")
|
x |
A vector |
limits |
A representation of limits |
aes |
An aesthetic for which to evaluate the flattening. |
When using a ranged class as x
argument, the result can be
evaluated differently depending on the aes
argument. For example,
when x
is an IRanges
class, setting aes = "xmin"
gives
rescaled start values and aes = "xmax"
gives rescaled end values.
A numeric
vector with values between 0-1
S4ForceFlat,WoodenHorse,ANY-method
: Releases the GreekSoldier
attribute and call
the generic on the result.
S4ForceFlat,knownContinuous,numeric-method
: Calls scales::rescale
.
S4ForceFlat,Vector,numeric-method
: Attempts to coerce to a vector first.
S4ForceFlat,IntegerRanges,numeric-method
: for xmin/ymin gives start, for xmax/ymax gives
end, otherwise gives midpoint.
S4ForceFlat,ANYGenomic,GRanges-method
: Linearises seqlevels, then gives start for xmin/ymin
and end for xmax/xmax.
1 2 3 4 5 6 7 8 | S4ForceFlat(1:5, limits = c(1, 5))
# Range classes give different results based on the aes argument
require(GenomicRanges)
value <- GRanges(c("chr1:10-20", "chr2:10-20"))
limits <- GRanges(c("chr1:1-30", "chr2:1-30"))
S4ForceFlat(value, limits, aes = "xmin")
S4ForceFlat(value, limits, aes = "xmax")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.