Skip to contents

Check event list for overlaps (begin of one event before the end of a previous event)

Usage

overlapping(events)

Arguments

events

event list as returned by hsEvents

Value

TRUE if there are overlapping events, otherwise FALSE

Examples

events <- kwb.event::exampleEvents()
  
# The example events do not overlap
overlapping(events)
#> [1] FALSE
  
# The order of the events (here reverse order) does not matter
overlapping(events[nrow(events):1, ])
#> [1] FALSE
  
# Put the begin of the second event before the end of the last event
events$tBeg[2] <- mean(c(events$tBeg[1], events$tEnd[1]))
  
# Now there are overlapping events!
overlapping(events)
#> [1] TRUE