markbouts.acclist | R Documentation |
This function identifies bouts of physical activity using user-defined breakpoints for accelerometer counts.
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, progbar = TRUE)
## 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, progbar = TRUE)
## 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, progbar = NULL)
object |
an object of class |
value |
vector of breaks to define physical activity modes. The lowest breakpoint must be 0. |
which |
either 'counts' or 'steps' for |
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 |
collapse.by |
dataset aggregation level. See argument |
value.labels |
labels for physical activity modes. |
bouts.labels |
labels for bouts duration catergories ( |
extreme |
if |
keep.error |
logical flag. If |
progbar |
logical flag. Should a progress bar be used? Available for Windows only. Argument not used for class |
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.
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.
Marco Geraci
readAccDir
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.