View source: R/60-interval_index-query-api.R
| pop_all_point | R Documentation |
Pop All Intervals Matching a Point
pop_all_point(
x,
point,
bounds = NULL,
match_at = c("interval", "start", "end", "either")
)
x |
An |
point |
Query point. |
bounds |
Optional boundary override. One of |
match_at |
How the query point is matched against each entry. One of
|
Use as.list() to convert elements to a standard R list.
A list with elements and remaining, both interval_index objects.
ix <- interval_index("a", "b", "c", start = c(1, 2, 4), end = c(3, 2, 5))
out <- pop_all_point(ix, 2)
as.list(out$elements)
# Sweep-line retirement: remove everything ending at x = 3
retired <- pop_all_point(ix, 3, match_at = "end")
as.list(retired$elements)
as.list(retired$remaining)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.