plot_hypnogram: Draw a hypnogram with ggplot2.

Description Usage Arguments Value References

Description

A hypnogram represents the stages of sleep as a function of time. plot_hypnogram() plot a hypnogram using the ggplot2 library from stages sleep in an event dataframe. REM stage is higlighted in red.

Usage

1
plot_hypnogram(events, labels = c("N3", "N2", "N1", "REM", "AWA"))

Arguments

events

Events dataframe. Dataframe must have begin (POSIXt), end (POSIXt) and event

labels

Sleep stages labels. Defaults to c("N3","N2","N1","REM","AWA").

Value

a ggplot object.

References

Silber MH, Ancoli-Israel S, Bonnet MH, Chokroverty S, Grigg-Damberger MM, et al. (2007). "The visual scoring of sleep in adults". Journal of Clinical Sleep Medicine. 3 (2): 121–31. PMID 17557422


boupetch/rmdf documentation built on June 26, 2019, 2:25 p.m.