hsMergeEvents: Merge two Event Lists

View source: R/eventMerge.R

hsMergeEventsR Documentation

Merge two Event Lists

Description

Events in data frames events1 and events2 are merged in such a way that overlapping events are combined to one event and events that are fully contained in other events are discarded.

Usage

hsMergeEvents(events1, events2, renumber = TRUE, dbg = FALSE)

Arguments

events1

data frame containing events as provided by e.g. hsEvents

events2

data frame containing events as provided by e.g. hsEvents

renumber

if TRUE, rows in result data frame are renumbered from one to number of rows.

dbg

if TRUE, debug messages are shown.

Value

data frame with fields tBeg, tEnd, dur containing the times of event begin and event end and the event duration in seconds, respectively. The event duration is the difference between end and begin of the event plus the time period that one timestamp represents (signal width).


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