Build an Interval Index from elements and interval bounds
Source:R/40-interval_index-core.R
as_interval_index.RdBuild an Interval Index from elements and interval bounds
Examples
ix <- as_interval_index(c("a", "b", "c"), start = c(1, 2, 2), end = c(3, 2, 4))
ix
#> <interval_index> size=3 endpoint_type=numeric bounds=[)
#> preview[3]: {start= num 1 end= num 3 item= chr "a"} | {start= num 2 end= num 2 item= chr "b"} | {start= num 2 end= num 4 item= chr "c"}
as.list(peek_point(ix, 2, which = "all"))
#> [[1]]
#> [1] "a"
#>
#> [[2]]
#> [1] "c"
#>