This function collapses accelerometer data into a dataframe with summary statistics.
collapse(...)
# S3 method for accfile
collapse(object, which = "counts", palist = list(value = c(0, 100, 1000, 5000, 13000),
rescale.epoch = 60, labels = NULL, extreme = NULL), mwlist = list(value = 20,
nz = 0, rescale.epoch = 60), collapse.by = "%Y-%m-%d", collapse.epoch = 60, aggregate.by =
NULL, FUN.list = list(mean = function(x) mean(x, na.rm = TRUE)),
keep.extreme = FALSE, keep.error = FALSE, ...)A data frame containing the following variables
aggregation factor
file identifier
named columns according to arguments FUN and labels of palist
an object of class gt1m.
either 'counts' or 'steps' for gt1m files or one of c('x','y','z','steps') for gt3x files.
list of arguments for markpa.accfile.
list of arguments for markwear.accfile.
dataset aggregation level. See argument format from strptime for options and details below.
epoch by which time spent in different physical activity modes is summarized. See details.
pre-collapsing aggregation level for accelerometer values. See argument format from strptime for options.
a named list of functions. See fun.collapse.
logical flag. If FALSE (default) extreme values will be replaced by NAs. See markpa.accfile.
logical flag. If FALSE (default) data errors as identified by errorChk will be replaced by NAs.
arguments for dateSummary.
Marco Geraci
Geraci M, Rich C, Sera F, Cortina-Borja M, Griffiths LJ, and Dezateux C (2012). Technical report on accelerometry data processing in the Millennium Cohort Study. London, UK: University College London. Available at https://discovery.ucl.ac.uk/1361699
markpa.accfile, markwear.accfile, fun.collapse