Read a stages export from Compumedics software in .txt format.

read_events_compumedics(
  txt,
  startTime = as.POSIXlt("2000-01-01"),
  labels = c(AWA = 0, N1 = 1, N2 = 2, N3 = 3, REM = 5)
)

Arguments

txt

txt file path.

startTime

Character string or date object of the hypnogram start.

labels

Labels and values as a named list. Defaults to c("AWA" = 0, "N1" = 1, "N2" = 2, "N3" = 3, "REM" = 5).

Value

A dataframe of stages.