Learn R Programming

pawacc (version 1.1)

agg.accfile: Aggregate Accelerometry Data

Description

This function aggregates count values

Usage

agg.accfile(object, by, x = NULL, y = NULL,
	keep.error = FALSE)

Arguments

object
an object of class accfile.
by
epoch by which count and steps are aggregated. Note: it cannot be less that the accelerometer epoch (object$info$epoch).
x
optional argument. If NULL, this is set to counts (object$counts).
y
optional argument. If NULL, this is set to counts (object$steps).
keep.error
logical flag. Should errors be omitted?

Value

  • countsaggregated counts
  • stepsaggregated steps
  • ts_aggtime stamping

References

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 http://discovery.ucl.ac.uk/1361699

See Also

collapse.accfile

Examples

Run this code
data(gt1m_sample)

# aggregate by 30-second epochs
agg.accfile(gt1m_sample, by = 30)

# aggregate by 5-minute epochs
agg.accfile(gt1m_sample, by = 300, keep.error = FALSE)

Run the code above in your browser using DataLab