add_time_since_event: Add indexing of signal time in relation to some recurring...

View source: R/annotate_waveforms.R

add_time_since_eventR Documentation

Add indexing of signal time in relation to some recurring event.

Description

Index is the time since the most recent occurrence of some event e.g. QRS complex

Usage

add_time_since_event(
  data,
  time_event,
  time_col = 1,
  prefix = "ann",
  incl_prev_lengths = FALSE
)

Arguments

data

A data frame with at least a time column

time_event

A vector of time stamps for some annotation

time_col

Index or name of time column

prefix

Prefix to new columns

incl_prev_lengths

Include length of previous 3 cycles as variables


JohannesNE/waveformtools documentation built on July 1, 2022, 8:48 p.m.