Peek All Intervals Matching a Point
Usage
peek_all_point(
x,
point,
bounds = NULL,
match_at = c("interval", "start", "end", "either")
)Arguments
- x
An
interval_index.- point
Query point.
- bounds
Optional boundary override. One of
"[)","[]","()","(]". Ignored whenmatch_atis not"interval".- match_at
How the query point is matched against each entry. One of
"interval"(default; containment underbounds),"start","end", or"either". Seepeek_point()for details.
Details
The returned interval_index can be inspected with as.list().
Examples
ix <- interval_index("a", "b", "c", start = c(1, 2, 4), end = c(3, 2, 5))
as.list(peek_all_point(ix, 2))
#> [[1]]
#> [1] "a"
#>
# Entries ending at 3
as.list(peek_all_point(ix, 3, match_at = "end"))
#> [[1]]
#> [1] "a"
#>
