Estimates rate from complete inter-trough breath periods or from the dominant respiratory-band spectral peak.
Arguments
- x, channel, band, min_period_sec, sr, assay_name
As in
respiratoryOnsets().- method
"peaks"for breath intervals or"spectral"for the dominant respiratory frequency.
Value
A data frame with one row per selected channel and columns
channel, method, rate_bpm, n_breaths, and sd_bpm.
Examples
sr <- 10
signal <- sin(2 * pi * 0.25 * (0:599) / sr)
breathingRate(signal, sr = sr)
#> channel method rate_bpm n_breaths sd_bpm
#> 1 1 peaks 15 14 0