clean_wuv: clean_wuv

View source: R/PulseWaveform.R

clean_wuvR Documentation

clean_wuv

Description

clean_wuv first identifies erroneous beats and removes them, by identifying abnormal values of U and V, and the y-axis difference between them. It then calculates O-O intervals and inter-beat intervals, and removes beats preceding large intervals.

Usage

clean_wuv(wuv, sp, inx, o, samp, bc, q = FALSE)

Arguments

wuv

a dataframe of all w, u and v values corresponding to detected and pre-cleaned beats in the time series

sp

the baseline-corrected PPG time series, polynomial spline form

inx

a vector of all inflection point x-coordinates in the PPG time series

o

a vector of all o points

samp

sampling rate

bc

the baseline-corrected PPG time series, discrete form

q

logical, will pause function and give the option of plotting rejected beats

Value

ibi

a vector of all inter-beat intervals (x-axis differences between sucessive W points)

oDiff

a vector of all O-O intervals (x-axis differences between successive O points)

d

a dataframe combining the following three structures:

wuv

the inputted dataframe of w, u and v values, with rows corresponding to erroneous beats removed

diffVU

a vector of y-axis differences between u and v for each beat - for scaling purposes

o2

a vector of O points, with those corresponding to erroneous beats removed

Examples

tmp <- clean_wuv(wuv = wuv, sp = splinePolyBC, inx = inflexX, o = o,
                 samp = samplingRate, bc = baseCor, q = F)

stw32/PulseWaveform documentation built on Dec. 6, 2022, 2:50 a.m.