PPG2beats | R Documentation |
This functions employs a low pass filter to attenuate non-systolic peaks, then rejects peaks that are too fast compared to the median rate of a buffer. Finally it interpolates too large gaps.
PPG2beats(
x,
r = 0.65,
f = 0.75,
buffer = 8,
FIR_args = list(type = "low", cut = 3, NAsub = 0),
correctionRangeSeconds = 1/1.5,
minPeakAmplitude = 0.01,
plotName = NULL,
...
)
x |
a rats time-series representing the original PPG signal |
r |
the rejection factor, expressed as a weight of the buffer's median R-R interval |
f |
the fill factor, expressed as a weight of the buffer's median R-R interval |
buffer |
integer. the rolling buffer, expressed in number of beats |
FIR_args |
a named list of arguments to be passed to FIR) filtering function. 'cut' and 'type' must be present, representing . If empty, the filtering is disabled. |
correctionRangeSeconds |
the half range in which the real maximum/minimum value should be searched, in seconds. around the derivative shift. Should be less then the periodicity of the signal. 0.5 is good for skin conductance. |
minPeakAmplitude |
the minimum delta from valley to peak for detection. Skin conductance traditionally uses 0.05uS, or 0.03uS |
plotName |
an optional filename to save a svg representation of the beats extraction |
a list of:
a logical vector of the same length of x with TRUE value corresponding to a match
the position of beats relatively to x's index
temporal coordinates of the beats (if x has a frequency attribute)
The value of x correspoding to the detected beats
a character vector defining for each beats if its a detected peak ('p') or an interpolated one ('p_filled')
the through-to-peak amplitudes of the detected beats
The absolute position of the beats along the signal. The values are independent from the 'mode' argument, allowing interaction between different calls of the function.
the position of rejected beats relatively to x's index
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.