Learn R Programming

rsleep (version 1.0.5)

plot_hypnodensity: Plot a hypnodensity graph using `ggplot2`.

Description

Plot a hypnodensity graph using `ggplot2` from the values returned from `score_stages_edf` function.

Usage

plot_hypnodensity(hypnodensity, stages = c("AWA", "REM", "N1", "N2", "N3"))

Value

A `ggplot2` hypnodensity graph.

Arguments

hypnodensity

A hypnodensity dataframe as returned by the `score_stages_edf` function.

stages

Vector of stages labels to plot.

References

Stephansen, J.B., Olesen, A.N., Olsen, M., Ambati, A., Leary, E.B., Moore, H.E., Carrillo, O., Lin, L., Han, F., Yan, H. and Sun, Y.L., 2018. Neural network analysis of sleep stages enables efficient diagnosis of narcolepsy. Nature communications, 9(1), p.5229.