wear_flag: Create Wear/Nonwear Flags

Description Usage Arguments Details Value

View source: R/wear_flag.R

Description

Determine during which time period, subject should wear the device. It is preferable that user provide their own wear/non wear flag which should has the same dimension as the activity data. This function provide wear/non wear flag based on time of day.

Usage

1
wear_flag(count.data, start = "05:00", end = "23:00")

Arguments

count.data

data.frame of dimension n*1442 containing the 1440 minute activity data for all n subject days. The first two columns have to be ID and Day.

start

start time, a string in the format of 24hr, e.g. "05:00"; defaults to "05:00".

end

end time, a string in the format of 24hr, e.g. "23:00"; defaults to "23:00"

Details

Fragmentation metrics are usually defined when subject is awake. The weartime provide time periods on which those features should be extracted. This can be also used as indication of wake/sleep.

Value

A data.frame with same dimension and column name as the count.data, with 0/1 as the elments reprensting wear, nonwear respectively.


postGGIR documentation built on Jan. 6, 2022, 5:08 p.m.