smooth_hypnogram: Smooth hypnogram epoch, simulating human scorers behaviour.

View source: R/events.R

smooth_hypnogramR Documentation

Smooth hypnogram epoch, simulating human scorers behaviour.

Description

Smooth hypnograms epoch, simulating human scorers behaviour.

Usage

smooth_hypnogram(hypnogram, event = "N2", neighbors = "REM", count = 2)

Arguments

hypnogram

A hypnogram dataframe.

event

Central stage label.

neighbors

Extremities stages labels.

count

Number of consecutive central stages.

Value

A hypnogram dataframe.

References

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.

Examples

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)

rsleep documentation built on Nov. 6, 2023, 1:06 a.m.