Learn R Programming

GENEAcore (version 1.2.0)

geneacore: GENEAcore Main Wrapper

Description

GENEAcore function that wraps the functionalities of geneacore_part1 to geneacore_part4. GENEAcore function which performs the following tasks for each valid day:

  • Checks and reads the data file and creates the Measurement Period Information (MPI)

  • Downsamples the file to 1Hz and detects periods of non movement

  • Calculates auto calibration parameters for the device

  • Samples daily raw bin file data and saves as daily RDS files

  • Reads and saves button press timestamps to the Measurement Period Information (MPI)

  • Applies calibration parameters to raw data

  • Identifies transitions for events processing only

  • Performs aggregation by event and/or epoch

  • Calculate steps, if option selected

  • Calculate non-wear coverage and rest coverage of events and/or epochs

  • Assign bout classifications to events only

  • Reports aggregated daily activity and sleep measures

  • Consolidates daily epochs or bouts outputs into a single file

Usage

geneacore(data_folder = data_folder, control = list())

Arguments

data_folder

Folder that contains raw data bin files to process or path to single bin file.

control

Named list of optional settings for geneacore functions.

Details

Control options (all optional):

cut_time_24hr

String. Default "15:00". Time in 24h to split days up by.

output_epochs

Logical. Default FALSE. Create epoch outputs.

epoch_duration

Integer. Default 1. Specify duration of fixed epochs.

output_events

Logical. Default TRUE. Create event outputs.

output_steps

Logical. Default FALSE. Calculate step counts and stepping rate during epoch processing. Steps are always calculated during events processing.

output_csv

Logical. Default FALSE. Allows CSV output to be saved during epoch and event processing.

timer

Logical. Default FALSE. Print elapsed times of each processing step.

multisession

Integer vector of length 2. Default c(1,1). Controls day split when running function across multiple R sessions. The first value is the current session number and the second is the total number of sessions. The default processes all days in a single session.

required_processing_hours

Integer. Default 0. Hours of wear time in a 24-hour day to be considered a valid day to be processed.

Examples

Run this code
if (FALSE) {
controls <- list(output_csv = TRUE, required_processing_hours = 4, timer = TRUE)
geneacore("path/to/folder", controls)
}

Run the code above in your browser using DataLab