Computes all nonlinear HRV metrics by calling ecgHRVpoincare,
ecgSampleEntropy, and ecgDFA, and merging
the results into a single data.frame.
Arguments
- rr
A data.frame with columns
channel,rr_ms, andtime_sec, as returned byecgRRintervals.- m
Embedding dimension for sample entropy (default: 2).
- r_factor
Tolerance factor for sample entropy (default: 0.2).
- short_range
Scale range for DFA alpha1 (default: c(4, 16)).
- long_range
Scale range for DFA alpha2 (default: c(16, 64)).
- rhythm_check
Logical; if
TRUE(default), gate the result onecgDetectAF: metrics for channels classified as AF or frequent ectopy are set toNAandrhythm/hrv_validcolumns are appended (HRV is undefined in atrial fibrillation).
Value
A data.frame with columns: channel, sd1, sd2, sd1_sd2_ratio, sample_entropy, m, r, alpha1, alpha2.
References
Shaffer, F. & Ginsberg, J.P. (2017). "An overview of heart rate variability metrics and norms." Frontiers in Public Health, 5, 258. doi:10.3389/fpubh.2017.00258
Task Force of the European Society of Cardiology and the North American Society of Pacing and Electrophysiology (1996). "Heart rate variability: Standards of measurement, physiological interpretation and clinical use." Circulation, 93(5), 1043–1065.
See also
ecgHRVpoincare for Poincare plot descriptors,
ecgSampleEntropy for sample entropy,
ecgDFA for detrended fluctuation analysis,
ecgHRVtime for time-domain HRV metrics,
ecgHRVfreq for frequency-domain HRV analysis.
Examples
set.seed(1)
n <- 300
time_sec <- cumsum(rep(0.85, n))
rr_ms <- 850 + 30 * sin(2 * pi * 0.1 * time_sec) + rnorm(n, sd = 15)
rr <- data.frame(channel = 1L, rr_ms = rr_ms, time_sec = time_sec)
ecgHRVnonlinear(rr)
#> channel sd1 sd2 sd1_sd2_ratio sample_entropy m r alpha1
#> 1 1 17.05586 32.69271 0.5217021 2.139282 2 5.214817 1.278931
#> alpha2 rhythm hrv_valid
#> 1 0.1323355 sinus TRUE