wear_flag {ActFrag} | R Documentation |
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")
count.data |
|
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" |
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.
A data.frame
with same dimension and column name as the count.data
, with 0/1 as the elments
reprensting wear, nonwear respectively.
data(example_activity_data)
count = example_activity_data$count
weartime = wear_flag(count.data = count)