markpa.acclist {pawacc}R Documentation

Classify mode of physical activity

Description

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

Usage

markpa(object, value, which = "counts", rescale.epoch = 60, labels = NULL,
extreme = NULL, keep.error = FALSE, progbar = TRUE)
## S3 method for class 'acclist'
markpa(object, value, which = "counts", rescale.epoch = 60, labels = NULL,
extreme = NULL, keep.error = FALSE, progbar = TRUE)
## S3 method for class 'accfile'
markpa(object, value, which = "counts", rescale.epoch = 60, labels = NULL,
extreme = NULL, keep.error = FALSE, progbar = NULL)

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.

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 errorChk will be replaced by NAs.

progbar

logical flag. Should a progress bar be used? Available for Windows only. Argument not used for class accfile.

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.

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.

Author(s)

Marco Geraci

See Also

readAccDir


[Package pawacc version 1.2.3 Index]