tileRle | R Documentation |
Creates an Rle of fixed-with bins from a continuous numeric Rle
tileRle(x, bs = 10L, method = c("max", "min", "mean"), roundSummary = FALSE)
x |
A numeric 'Rle' (or 'RleList') |
bs |
A positive integer specifying the bin size |
method |
The method for summarizing bins |
roundSummary |
Logical; whether to round bins with summarized coverage (default FALSE) |
An object of same class and length as 'x'
# creating a dummy coverage and visualizing it:
cov <- Rle(rpois(100,0.5))
plot(cov, type="l", col="lightgrey")
# summarizing to tiles of width 5 (by default using maximum)
cov2 <- tileRle(cov, bs=5L)
lines(cov2, col="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.