Description Usage Arguments Value Examples
This function follows the squish
function,
but allows extentions that work with objects other than numeric vectors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | squishThis(x, range = NULL, only.finite = TRUE, aes = "z")
## S4 method for signature 'WoodenHorse,ANY'
squishThis(x, range = c(0, 1), only.finite = TRUE, aes = "z")
## S4 method for signature 'numeric,numeric_OR_missing'
squishThis(x, range = c(0, 1), only.finite = TRUE, aes = "z")
## S4 method for signature 'Rle,numeric_OR_missing'
squishThis(x, range = c(0, 1), only.finite = TRUE, aes = "z")
## S4 method for signature 'IntegerRanges,numeric_OR_missing'
squishThis(x, range = c(0, 1), only.finite = TRUE, aes = "z")
## S4 method for signature 'ANYGenomic,GRanges'
squishThis(x, range = GRanges(NA_character_, IRanges(0, 1)))
|
x |
A vector of values to manipulate. |
range |
A range representing object. |
only.finite |
If |
aes |
An aesthetic for which to evaluate the function. |
The x
argument, but with out-of-bounds values squished to the
range.
1 2 3 4 5 | # For regular numeric vectors
squishThis(c(-1, 0.5, 1, 2, NA))
# For Rle-class
squishThis(Rle(1:4, 4:1), c(2,3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.