Builds a standard resting-ECG pipeline as a list of targets:
read -> lead -> R-peaks -> RR -> {HRV time, HRV freq} -> summary, plus an
RR-tachogram figure. With more than one record it fans out via dynamic
branching (one branch per record) and adds a combined cohort table.
Arguments
- name
Target-name prefix (a string; targets are
"<name>_pe"etc.).- records
NULLto use the bundled demo record (MIT-BIH 100 excerpt), or a character vector of WFDB record bases (paths without extension).- channel
Lead index to analyse (MIT-BIH 100: 1 = MLII, 2 = V5).
- detector
ecgDetectRpeaks()method (e.g. "pan_tompkins", "hamilton").
Examples
# The factory returns target objects to splice into a `_targets.R` list();
# building them does not run the pipeline.
targs <- tar_ecg_hrv() # bundled demo record (single-record pipeline)
length(targs)
#> [1] 10
class(targs[[1]])
#> [1] "tar_stem" "tar_builder" "tar_target" "environment"
# Cohort fan-out (dynamic branching) when given several record bases:
length(tar_ecg_hrv(records = c("data/100", "data/101")))
#> [1] 8