animate_hr: Animate ECG data and heart beats

Description Usage Arguments Value Examples

View source: R/animate_hr.R

Description

animate_hr produces a GIF of heart beats in (close to) real time.

Usage

1
animate_hr(ecg, beats, which_beats = NULL, big = FALSE)

Arguments

ecg

A data.frame with columns timestamp (POSIXct) and ecg (numeric) (see read_ube)

beats

A data.frame with columns timestamp (POSIXct), ecg, period_s, freq_hz, and freq_bpm (see find_hr)

which_beats

Indices of the heart beats (in param beats) to be animated. If NULL (default), all beats will be animated.

big

If FALSE (default) then throw an error if the animation will last more than 20s. This prevents R from crashing if it tries to animate too much.

Value

A gif_image object

Examples

1
  animate_hr(ecg_bw190918_62R, beats_bw190918_62R, which_beats = 44:50, big = TRUE)

beats documentation built on March 26, 2020, 5:51 p.m.