Find the index of the duration that contains the event time.
Source:R/find-duration.R
find_duration.Rd
This function find the index of the duration that contains the event time.
Examples
# Create a spatiotemporal event object
accidents <- create_spatiotemporal_events(sample_accidents)
# Create a duration object
durations <- create_durations("1 hour")
# Find the duration that contains each accident
find_duration(accidents, durations)
#> [1] 19 5 14 24 8 8 20 9 20 21