Learn R Programming

ActisoftR (version 0.0.2)

report_period: Generates reports based on input periods.

Description

Generates reports based on input periods.

Usage

report_period(period, acti_data, remove_bad = TRUE, tz = "UTC", ...)

Arguments

period

a dataframe containing participants and the start and end date/time periods.

acti_data

a dataframe of the form 'acti_data'.

remove_bad

a logical value used to indicate if 'bad' intervals or 'EXCLUDED' are removed. Set as TRUE.

tz

is the time zone. Optional argument. tz = "UTC" by default.

...

Optional parameters

Value

a dataframe

Details

Periods partially scored as 'bad' or 'EXCLUDED' are due to off-wrist or other reasons. In that case all summary estimates except <U+2018>time in bed<U+2019> will be set to NA, and the column <U+2018>with_excluded_bad<U+2019> will show a TRUE. See examples in the Vignettes. This can be avoided using remove_bad = FALSE. Sleep efficiency will be zero when there is an attempt to sleep (no sleep achieved in the period) within a rest. However, the sleep efficiency will be NA when there is not REST or SLEEP with in an interval of time.

Examples

Run this code
# NOT RUN {
# Example 1
library("lubridate")
data("act")
par <- data.frame(subject_ID = 1,
summary_duration_h = 24,
summary_type = "sequential",
summary_start_datime = ymd_hms("2017-12-05 00:00:00 UTC"),
summary_end_datime = ymd_hms("2017-12-15 00:00:00 UTC"))
report_period(period = par , acti_data = act)
# }

Run the code above in your browser using DataLab