A convenience function that combines detect_hrv_artefacts and correct_hrv_beats to perform both artefact detection/classification and correction in a single step, and then calculate the RMSSD.

calculate_hrv_rmssd(data, ...)

Arguments

data

A dplyr::tibble with a 'time' column (RR intervals in ms).

...

Arguments to be passed to detect_hrv_artefacts (e.g., alpha, c1, c2).

Value

A list with the following components

  • rmssd_values: The RMSSD value calculated from the corrected RR intervals.

  • classified_data: The data with beat classification

  • corrected_data: The data with beat correction