Calculate the total time of being in certain state, e.g. sedentary, active, MVPA, etc.
Time2(x, w, thresh, smallerthan = TRUE, bout.length = 1)
vector
of activity data.
vector
of wear flag data with same dimension as x
.
threshold to binarize the data.
Find a state that is smaller than a threshold, or greater than or equal to.
minimum duration of defining an active bout; defaults to 1.
Time