Learn R Programming

rsleep (version 1.0.4)

normalize_cycles: Normalize sleep cycles scored on Noxturnal software from start and stop flags to unique events.

Description

Normalize sleep cycles scored on Noxturnal software from start and stop flags to unique events.

Usage

normalize_cycles(events)

Arguments

events

Events dataframe. Dataframe must have begin (POSIXt), end (POSIXt) and event. Cycles flags must be named Activity-CLASSICstart, Activity-BNstart, Activity-BNend, Activity-REMstart, Activity-REMend, Activity-ENstart or Activity-ENend.

Examples

Run this code
cycles <- data.frame(event = c("Activity-CLASSICstart","Activity-CLASSICend"))
cycles$begin <- as.POSIXct(c("2016-01-16 01:13:30","2016-01-16 01:15:30"))
cycles$end <- as.POSIXct(c("2016-01-16 01:13:30","2016-01-16 01:15:30"))
normalize_cycles(cycles)

Run the code above in your browser using DataLab