Learn R Programming

EGM (version 0.1.1)

window: Window signal data based on different methods

Description

[Experimental]

Creates windows of signal data using various methods, such as rhythm patterns, time intervals, or reference points. Each window is returned as an individual egm object for further analysis.

Usage

window(object, window_method = c("rhythm"), ...)

window_by_rhythm( object, rhythm_type = "sinus", onset_criteria, offset_criteria, reference_criteria = NULL, adjust_sample_indices = TRUE, ... )

Value

A list of egm objects, each representing a window of the original signal.

Arguments

object

Object of the egm class, which includes header, signal information, and annotation information.

window_method

A character string specifying the windowing method. Options include:

  • rhythm - Windows based on rhythm patterns (requires rhythm_type and criteria)

...

Additional arguments passed to specific windowing methods.

rhythm_type

A character string specifying the rhythm type (e.g., "sinus"). Currently supported: "sinus" (requires reference check).

onset_criteria

A named list of criteria to identify onset points. Names should match column names in the annotation table.

offset_criteria

A named list of criteria to identify offset points. Names should match column names in the annotation table.

reference_criteria

A named list of criteria to identify reference points that must exist between onset and offset. Set to NULL to skip reference validation.

adjust_sample_indices

Logical, whether to adjust annotation sample indices in the returned windows to be relative to the window start. Default is TRUE.

Details

This function provides a modular approach to windowing electrophysiological signals. The method parameter determines the windowing strategy, with each method requiring its own set of additional parameters.