Description Usage Arguments Note Author(s) Examples
Useful for working out what is the minimal information to describe a series of numbers
1 | range_merge(x, gaplength = 0)
|
x |
a numeric |
gaplength |
allow a gap within a run. default=0 |
This is almost certainly replaceble using code from IRanges package, and Rle obects.
Mark Cowley
1 2 3 4 5 6 7 8 9 10 11 12 | x <- c(1, 2, 3, 4, 5, 9)
range_merge(x)
# from to
# 1 1 5
# 2 9 9
range_merge(x, gaplength=3)
# from to
# 1 1 9
range_merge(x, gaplength=2)
# from to
# 1 1 5
# 2 9 9
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.