Time: Time of A Certain activity State

Description Usage Arguments Value Examples

View source: R/Time.R

Description

Calculate the total time of being in certain state, e.g. sedentary, active, MVPA, etc.

Usage

1
Time(x, w, thresh, smallerthan = TRUE, bout.length = 1)

Arguments

x

vector of activity data.

w

vector of wear flag data with same dimension as x.

thresh

threshold to binarize the data.

smallerthan

Find a state that is smaller than a threshold, or greater than or equal to.

bout.length

minimum duration of defining an active bout; defaults to 1.

Value

Time

Examples

1
2
3
4
5
data(example_activity_data)
count1 = c(t(example_activity_data$count[1,-c(1,2)]))
wear1 = c(t(example_activity_data$wear[1,-c(1,2)]))
time_sedentary = Time(x = count1, w = wear1, thresh = 100,
bout.length = 1, smallerthan = TRUE)

junruidi/actigraphy documentation built on Sept. 25, 2019, 7:48 a.m.