Skip to contents

Peek All Intervals Within a Query Interval

Usage

peek_all_within(x, start, end, bounds = NULL)

Arguments

x

An interval_index.

start

Query interval start.

end

Query interval end.

bounds

Optional boundary override. One of "[)", "[]", "()", "(]".

Value

An interval_index slice of all matches (possibly empty).

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(6, 3, 5))
as.list(peek_all_within(ix, 1, 4))
#> [[1]]
#> [1] "b"
#>