overlapping: Are there overlapping Events?

View source: R/eventRelation.R

overlappingR Documentation

Are there overlapping Events?

Description

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)
  
# The order of the events (here reverse order) does not matter
overlapping(events[nrow(events):1, ])
  
# 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)
  

KWB-R/kwb.event documentation built on June 14, 2022, 1:15 p.m.