Flags implausible or poor-quality heart rate observations based on physiologic thresholds, missingness and repeated values.
Arguments
- data
tbl. Data frame with the following columns with minute-level epoch data with the following columns:
participant_id: Participant identifiersession_id: Session identifierdtt: POSIXct epoch timestampdttPOSIXct epoch timestamp.
- hr_low
numeric, positive whole number. Lower bound for plausible heart rate (Default: 50 bpm)
- hr_high
numeric, positive whole number. Upper bound for plausible heart rate. If NULL, no upper bound is applied (Default: NULL)
- hr_rep_day
numeric, positive whole number. Number of consecutive missing heart rate values allowed during non-sleep minutes (Default: 10).
- hr_rep_sleep
numeric, positive whole number. Number of consecutive missing heart rate values allowed during sleep minutes (Default: 30).
Value
tbl. The input data frame with the following additional columns:
hrate_low: TRUE if heart rate is belowhr_lowthreshold, FALSE otherwise.hrate_hi: TRUE if heart rate is abovehr_highthreshold (ifhr_highis not NULL), FALSE otherwise. Column is not created ifhr_highis NULL.hrate_no: TRUE if heart rate is missing, FALSE otherwise.hrate_repeat_actv: TRUE if there are more thanhr_rep_dayconsecutive identical heart rate values during non-sleep minutes, FALSE otherwise.hrate_repeat_slp: TRUE if there are more thanhr_rep_sleepconsecutive identical heart rate values during sleep minutes, FALSE otherwise.hrate_excluded: TRUE if any above exclusion criteria are met, FALSE otherwise.