markbouts.acclist: Classify accumulation of physical activity in bouts

Description Usage Arguments Details Value Author(s) See Also

Description

This function identifies bouts of physical activity using user-defined breakpoints for accelerometer counts.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
markbouts(object, value, which = "counts", bts = c(0, 10, 20, Inf), rescale.epoch = 60,
collapse.by = "%Y-%m-%d", value.labels = NULL, bouts.labels = NULL,
extreme = NULL, keep.error = FALSE)
## S3 method for class 'acclist'
markbouts(object, value, which = "counts", bts = c(0, 10, 20, Inf), rescale.epoch = 60,
collapse.by = "%Y-%m-%d", value.labels = NULL, bouts.labels = NULL,
extreme = NULL, keep.error = FALSE)
## S3 method for class 'accfile'
markbouts(object, value, which = "counts", bts = c(0, 10, 20, Inf), rescale.epoch = 60,
collapse.by = "%Y-%m-%d", value.labels = NULL, bouts.labels = NULL,
extreme = NULL, keep.error = FALSE)

Arguments

object

an object of class acclist or accfile.

value

vector of breaks to define physical activity modes. The lowest breakpoint must be 0.

which

either 'counts' or 'steps' for gt1m files or one of c('x','y','z','steps') for gt3x files.

bts

vector of breaks to define bouts duration (in minutes).

rescale.epoch

epoch expressed in the same unit as acceleromenter's epoch to determine multiplier to rescale value (default is 60). See details.

collapse.by

dataset aggregation level. See argument format from strptime for options and details below.

value.labels

labels for physical activity modes.

bouts.labels

labels for bouts duration catergories (NULL is recommended).

extreme
keep.error

logical flag. If FALSE (default) data errors as identified by errorChk will be replaced by NAs.

Details

Breakpoints are specified as counts per seconds using value. If the epoch used for value is different from the accelerometer's epoch, a rescaling is applied. E.g., if epoch is 15 seconds and breakpoints are expressed as counts per 60 seconds, value is divided by 60/15 = 4. There can be n physical activity modes at maximum, where n is the length of value.

The argument extreme is NULL by default. Use either ‘last’ to select the last category or the category number 1 to n.

Value

The function markbouts.accfile returns duration, frequency and mean duration of bouts by bout category, physical activity mode and T levels of collapse.by (e.g., day) in array of dimension c(length(bts) - 1,length(value) + 1,3,T). markbouts.acclist is applied to objects of class acclist, in which case a list of arrays of the same length as the number of accelerometer files in object is returned.

Author(s)

Marco Geraci

See Also

readAccDir


pawacc documentation built on May 2, 2019, 5:20 p.m.