## Begin prepare data ----
paths <- pulse_example()
chn <- paste0("c", formatC(1:10, width = 2, flag = "0"))
heart_rates <- PULSE(
paths,
discard_channels = chn[-9],
raw_v_smoothed = FALSE,
show_progress = FALSE)
## End prepare data ----
# Default
pulse_plot(heart_rates)
# A single ID
pulse_plot(heart_rates, ID = "c09")
# Without facets, the different basal heartbeat rates become evident in #' non-normalized data
pulse_plot(heart_rates, facets = FALSE)
# Without facets, normalized data always lines up (around 1) during the #' baseline period
pulse_plot(
pulse_normalize(heart_rates),
normalized = TRUE,
facets = FALSE)
# The plot can be modified using ggplot2 syntax
pulse_plot(heart_rates) + ggplot2::theme_dark()
# Data can also be visualized using BPM (Beats Per Minute)
pulse_plot(heart_rates, bpm = TRUE)
# If inspecting the heart rate estimates for a single ID and suppressing the
# LOESS smoothing, the confidence interval of each estimate is also shown
pulse_plot(heart_rates, ID = "c09", smooth = FALSE)
Run the code above in your browser using DataLab