Skip to contents

Transforming the events data to a one second EPOCH data that contains expanded metrics on physical activity.

Usage

create_1s_epoch(data, good_days = 1:9, remove_days = FALSE)

Arguments

data

Either a process.data.events or merge.data.events data set to be converted to a one second EPOCH data set

good_days

An integer vector denoting the wear days that have valid data. The default is 1:9, as for the Pregnancy 24/7 study the wear period last nine days.

remove_days

A logical denoting if merge data set should be subsetted by the good_days. Default is FALSE.

Value

A one.epoch.data object, which is a data.frame that has the same variables as the data parameter plus mets1, mets30, mets60, and

  • date which is just date version of the time variable and

  • ap.posture which is a replicate of the activity variable to conform to previous work.

Details

The cumulativesteps and methrs variables are renamed to conform to previous work done in this field.

  • cumulativesteps to steps

  • methrs to met.hrs

One second, thirty second, and sixty second variants of MET hours are created and named accordingly.

  • mets1 for one second

  • mets30 for thirty second

  • mets60 for sixty second

Examples

if (FALSE) { # \dontrun{
process_dat <- process_events(data = dat)
sec_by_sec <- create_1s_epoch(data = process_dat)
} # }