Skip to contents

This function generates a combined visualization of a hypnogram, sleep cycles, and, if using the 'dude' method for sleep cycles estimates, cycle densities.

Usage

plot_summary(sleepcycle_obj, id = NULL)

Arguments

sleepcycle_obj

An object of class SleepCycle.

id

(Optional) A subject identifier for grouped objects.

Value

A grid of ggplot objects.

Examples

data("hypnogram_single")
plot_summary(
  sleepcycles_from_hypnogram(
    hypnogram_single,
    epoch_col = "epoch",
    stage_col = "stage",
    method = "dude",
    verbose = FALSE
  )
)

plot_summary(
  sleepcycles_from_hypnogram(
    hypnogram_single,
    epoch_col = "epoch",
    stage_col = "stage",
    method = "feinberg",
    verbose = FALSE
  )
)