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,
...
)Arguments
- object
Object of the
egmclass, which includes header, signal information, and annotation information.- window_method
A
characterstring 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
characterstring 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.