hsJoinEvents: Join events in event list

View source: R/eventJoin.R

hsJoinEventsR Documentation

Join events in event list

Description

Join consecutive events in event list evts. The result of joining two events A and B is a event with begin time of A and end time of B.

Usage

hsJoinEvents(evts, ..., renumber = TRUE, dbg = FALSE)

Arguments

evts

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

...

numeric vectors containing the event numbers to be joined, e.g. 5:10, 15:20 will join events 5 to 10 and 15 to 20 to one event in each case

renumber

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

dbg

if TRUE, debug messages are shown.

Value

A 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.