Create a 1 second EPOCH data set
create_1s_epoch.Rd
Transforming the events data to a one second EPOCH data that contains expanded metrics on physical activity.
Arguments
- data
Either a
process.data.events
ormerge.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 thetime
variable andap.posture
which is a replicate of theactivity
variable to conform to previous work.
Details
The cumulativesteps
and methrs
variables are renamed to conform
to previous work done in this field.
cumulativesteps
tosteps
methrs
tomet.hrs
One second, thirty second, and sixty second variants of MET hours are created and named accordingly.
mets1
for one secondmets30
for thirty secondmets60
for sixty second
Examples
if (FALSE) { # \dontrun{
process_dat <- process_events(data = dat)
sec_by_sec <- create_1s_epoch(data = process_dat)
} # }