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.
wear_flag(count.data, start = "05:00", end = "23:00")
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 time, a string in the format of 24hr, e.g. "05:00"; defaults to "05:00".
end time, a string in the format of 24hr, e.g. "23:00"; defaults to "23:00"
A data.frame
with same dimension and column name as the count.data
, with 0/1 as the elments
reprensting wear, nonwear respectively.
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.