pulse.hr: Pulse: Calculating Heart Rate

View source: R/pulse.hr.R

pulse.hrR Documentation

Pulse: Calculating Heart Rate

Description

A worker function to calculate heart rate

Usage

pulse.hr(
  signal,
  sampling.rate = 5,
  search.scope = 1,
  score.parameter = 0.5,
  cor.min = 0.5,
  display = c("all", "ppg", "none"),
  ppg.zoom = TRUE
)

Arguments

signal

an integer vector, infrared signal from pulse device.

sampling.rate

an integer, sampling rate in Hz.

search.scope

a numeric, the ratio of lag domain length to the total signal length.

score.parameter

a numeric, the exponent used in the score.

cor.min

a numeric, the correlation threshold for qualified signal.

display

a character string, whether to display plots.

ppg.zoom

a logical, whether to zoom the PPG plot to fit signal intensity.

Value

a mixed list, locmax for local maxima, nominee for the best peak, cor.pass and anticor.pass for quality control, and hr for final heart rate.

See Also

pulse.extract()

Examples

folder <- system.file("extdata/pulse", package = "rambur")
pulse.data <- pulse.read(folder, timezone = "Europe/Berlin")
ex1 <- pulse.hr(subset(pulse.data,
datetime >= as.POSIXct("2025-05-21 00:01:00", tz = "Europe/Berlin") &
datetime < as.POSIXct("2025-05-21 00:02:00", tz = "Europe/Berlin"),
channel.1, drop = TRUE))

rambur documentation built on Oct. 17, 2026, 1:08 a.m.