Skip to contents

This function processes accelerometry counts into bouts of activity and returns those bouts as well as flags for whether the individual was wearing their device and if the wearing day can be considered complete

Usage

process_accelerometry_counts_into_bouts(
  accelerometry_counts,
  ...,
  collated_arguments = NULL
)

Arguments

accelerometry_counts

A data frame with two columns: time and activity counts (CPE, counts per epoch)

...

Additional arguments to be passed to the function.

collated_arguments

An optional list of previously collated arguments.

Value

A list of processed data frames containing identified walk bouts, non-wearing periods, and complete days, based on the provided accelerometry counts and processing parameters.

Details

The input schema for the accelerometry data is time and activity_counts.

  • time should be a column in date-time format, in the UTC time zone, with no null values.

  • activity_counts should be a positive numeric column with no null values.

This function processes accelerometry counts into bouts of activity. The function first validates the input data in the first step. In the second step, the function identifies bouts of activity based on a specified minimum number of active counts per epoch, a maximum number of consecutive inactive epochs allowed within a bout, and a minimum bout length. In the third step, the function identifies non-wearing periods based on a specified threshold of consecutive epochs with 0 activity counts. In the fourth step, the function identifies complete days of wearing the accelerometer based on a specified minimum number of hours of wearing and the epoch length. The returned list includes information about each complete day, including the start and end times of each day, the duration of the day in seconds, the number of epochs, the total number of cpm for the day, and the bouts of activity within the day.