Peek First Interval Within a Query Interval
Details
Returns the first match in canonical interval order. Use peek_all_within()
to retrieve all matches as an interval_index slice.
Examples
ix <- interval_index("a", "b", "c", start = c(1, 2, 4), end = c(6, 3, 5))
peek_within(ix, 1, 4)
#> [1] "b"