sleep_int {bp}R Documentation

Sleep Interval Manual Override

Description

Adjusts WAKE column to reflect start and end of user-defined sleep period. If sleep_start_end is NULL and WAKE column is included in input data, this function will not alter data.

Usage

sleep_int(data, sleep_start_end = NULL, adj = TRUE)

Arguments

data

Supplied data from function

sleep_start_end

User-supplied sleep interval to indicate start and end time of the sleep interval of interest. Must only contain 2 values and must be 24-hour denoted integers

adj

Logical indicating whether or not to perform necessary adjustments / additions to data for WAKE column (i.e. set the default sleep time from 11PM - 6 AM if no interval specified and a DATE_TIME column is available). Default set to TRUE. adj == FALSE essentially acts as a pass statement

Value

Dataframe with added / adjusted WAKE column moved after DATE_TIME column containing binary 1 (awake) and 0 (asleep)


[Package bp version 2.1.0 Index]