Skip to contents

Reads a Polar (Flow / H10) export into a PhysioExperiment. A heart-rate column (bpm) becomes the "raw" assay; R-R intervals (ms) are attached as PhysioCore::PhysioEvents (one event per beat, with onset at the cumulative R-R time and the interval in the value). When only R-R intervals are present, instantaneous heart rate (60000 / R-R) is used as the signal.

Usage

readPolar(path, sep = ",")

Arguments

path

Path to a Polar .csv/.txt export.

sep

Field separator (default: comma).

Value

A PhysioExperiment; R-R intervals are available via PhysioCore::getEvents().

References

Polar. "Flow / H10 heart-rate and R-R export."

Examples

f <- system.file("extdata", "polar_hr.csv", package = "PhysioDevices")
if (nzchar(f)) {
  pe <- readPolar(f)
  PhysioCore::nEvents(PhysioCore::getEvents(pe))
}
#> [1] 5