e <- data.frame(begin = as.POSIXlt(c(1536967800,1536967830,1536967860),origin = "1970-01-01"))
e$end <- as.POSIXlt(c(1536967830,1536967860,1536967890), origin = "1970-01-01")
e$event = c("N3","N3","REM")
plot_hypnogram(e)
Run the code above in your browser using DataLab