Check events dataframe format compliance.

check_events(events)

Arguments

events

Events dataframe. Dataframe must contain begin (POSIXt), end (POSIXt) and event (character) columns.

Value

Boolean, according to the events dataframe format compliance.

Examples

events <- data.frame(begin = as.POSIXct(c(1536967800,1536967830,1536967860), origin = "1970-01-01"))
events$end <- as.POSIXct(c(1536967830,1536967860,1536967890), origin = "1970-01-01")
events$event = c("N3","N3","REM")
rsleep::check_events(events)