stages_stats: Get stages events related stats in a named vector.

Description Usage Arguments Value Examples

Description

stages_stats computes stages related stats.

Usage

1

Arguments

e

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

Value

stages vector

Examples

1
2
3
4
e <- data.frame(begin = as.POSIXlt(seq(from = 0, to = 30*10, by = 30),origin = "1970-01-01"))
e$end <- as.POSIXlt(seq(from = 30, to = 30*11, by = 30), origin = "1970-01-01")
e$event = c("AWA","N1","N2","N3","N3","REM","N2","REM","N2","REM","AWA")
stages_stats(e)

boupetch/rmdf documentation built on June 26, 2019, 2:25 p.m.