Learn R Programming

pawacc (version 1.1)

markpa.acclist: Classify mode of physical activity

Description

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

Usage

markpa.acclist(object, value, rescale.epoch = 60, labels = NULL,
extreme = NULL, keep.error = FALSE)
markpa.accfile(object, value, rescale.epoch = 60, 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.
rescale.epoch
epoch expressed in the same unit as acceleromenter epoch to determine multiplier to rescale value (default is 60). See details.
labels
labels for physical activity modes.
extreme
if value includes a threshold for defining the category of extreme values, this argument identifies such category among the physical activity modes defined by value. See details.
keep.error
logical flag. If FALSE (default) data errors as identified by errorCts will be replaced by NAs.

Value

  • If object is of class acclist, a list of factors of the same length as the number of accelerometer files in object. If object is of class accfile, a single factor will be given. The number of levels is equal to length(value) + 1.

Details

Breakpoints are specified as counts per seconds using value. If the epoch used for value is different from the accelerometer 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. Currently, this function is implemented for class gt1m only.

See Also

readAccDir