smooth_hypnogram | R Documentation |
Smooth hypnograms epoch, simulating human scorers behaviour.
smooth_hypnogram(hypnogram, event = "N2", neighbors = "REM", count = 2)
hypnogram |
A hypnogram dataframe. |
event |
Central stage label. |
neighbors |
Extremities stages labels. |
count |
Number of consecutive central stages. |
A hypnogram dataframe.
Liang, Sheng-Fu, Chin-En Kuo, Yu-Han Hu, Yu-Hsiang Pan, and Yung-Hung Wang. "Automatic stage scoring of single-channel sleep EEG by using multiscale entropy and autoregressive models." IEEE Transactions on Instrumentation and Measurement 61, no. 6 (2012): 1649-1657.
hypnogram <- data.frame(begin = as.POSIXlt(
c(1536967800,1536967830,1536967860),origin = "1970-01-01"))
hypnogram$end <- as.POSIXlt(c(1536967830,1536967860,1536967890),
origin = "1970-01-01")
hypnogram$event = c("REM","N2","REM")
smooth_hypnogram(hypnogram, "N2","REM",1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.