event_gaps: Event Gaps

View source: R/event_metrics.R

event_gapsR Documentation

Event Gaps

Description

Returns the intervals over which there are no events.

Usage

event_gaps(e, closed = TRUE, range = NULL)

Arguments

e

An event table.

closed

Logical value indicating whether events should be interpreted as closed intervals. If TRUE, no gaps are returned at breaks between two adjacent events.

range

An event table specifying, by its event_range, the interval within which to check for gaps. If NULL, the range of e is used.

See Also

event_coverage for coverage (the inverse of gaps), fill_event_gaps for filling gaps with empty events.

Examples

event_gaps(events(c(1, 3, 5), c(2, 4, 5)))    # gaps between events
event_gaps(events(1:5))                       # no gaps
event_gaps(events(1:5), closed = FALSE)       # gaps at breaks
event_gaps(events(1:5), range = events(0, 6)) # gaps to edge of range  

ezwelty/linbin documentation built on April 19, 2023, 8:41 a.m.