Identifies candidate peaks in a smoothed glucose trace using dynamically adjusted prominence and minimum-distance criteria, restricted to values that exceed the corrected baseline by a minimum rise and an absolute floor.
Arguments
- glucose
Numeric vector, smoothed glucose trace (see
sg_smooth()).- baseline
Numeric scalar, corrected baseline (see
correct_baseline()).- glucose_sd
Numeric scalar, glucose standard deviation used to set dynamic prominence/distance thresholds.
- min_rise
Numeric, minimum rise above baseline required for a peak to be considered valid. Default
10(mg/dL).- abs_floor
Numeric, absolute minimum glucose value for a valid peak. Default
70(mg/dL).