agcalibrate: Calibrate acceleration data

View source: R/agread.R

agcalibrateR Documentation

Calibrate acceleration data

Description

This function uses a C++ implementation of the GGIR 'g.calibrate' function.

Usage

agcalibrate(
  raw,
  verbose = FALSE,
  tz = "UTC",
  imputeTimeGaps = FALSE,
  spherecrit = 0.3,
  sdcriter = 0.013,
  minloadcrit = 168L,
  debug = FALSE,
  ...
)

Arguments

raw

data frame of raw acceleration data obtained from

verbose

Print the progress of the calibration for the raw data, Default: FALSE

tz

the desired timezone, Default: UTC

imputeTimeGaps

Imputes gaps in the raw acceleration data, Default: FALSE

spherecrit

The minimum required acceleration value (in g) on both sides of 0 g for each axis. Used to judge whether the sphere is sufficiently populated

sdcriter

Criteria to define non-wear time, defined as the estimated noise measured in the raw accelerometer data.

minloadcrit

The minimum number of hours the code needs to read for the autocalibration procedure to be effective (only sensitive to multitudes of 12 hrs, other values will be ceiled)

debug

print out diagnostic information for C++ code

...

Additional arguments to pass into the agread function

Details

This function uses a C++ implementation of the GGIR 'g.calibrate' function to return calibrated raw acceleration data.

Value

Returns the calibrated raw acceleration data

See Also

force_tz

Examples

   path <- system.file("extdata/example.gt3x", package = "agcounts")
   data <- read.gt3x::read.gt3x(path, asDataFrame = TRUE)
   data <- agcalibrate(raw = data)

bhelsel/agcounts documentation built on June 14, 2024, 12:41 a.m.