readAxivity {GGIRread}R Documentation

Function to read .cwa-format files as produced by the accelerometer named 'Axivity'

Description

For reading .cwa-format data with the Axivity AX3 and AX6 sensors.

Usage

  readAxivity(filename, start = 0, end = 0, progressBar = FALSE, 
    desiredtz = "", configtz = c(), interpolationType=1, loadbattery = FALSE,
    header = NULL, frequency_tol = 0.1, maxAllowedCorruptBlocks = 20)

Arguments

filename

filename (required) is name of cwa file to read

start

non-negative integer which is a cwa file block number.

end

non-negative integer which is a cwa file block number. End must be not be less than start. If end is less or equal to start, then there is no data read.

progressBar

Is trigger to switch on/off the text progress bar. If progressBar is TRUE then the function displays the progress bar but it works slightly slower

desiredtz

Desired timezone, a character with timezone database name.

configtz

Only functional for AX3 cwa data at the moment. Timezone in which the accelerometer was configured. Only use this argument if the timezone of configuration and timezone in which recording took place are different.

interpolationType

Integer to indicate type of interpolation to be used, 1=linear, 2=nearest neighbour.

loadbattery

Boolean to indicate whether battery voltage should be loaded

header

Header to be reused if it was extracted earlier

frequency_tol

Numeric value representing the tolerance for frequency bias expressed as a fraction of the expected sampling frequency. For example, 0.10 indicates that we accept the sampling frequency configured at 100 Hertz to vary between 90 and 110 Hertz. If this condition is not met the data will be imputed with a constant value and the start and end time will be logged in the QClog output object. Regardless of the setting the function will always log instances when frequency differs by more than 5%, but if this is less than frequency_tol the block will not be imputed.

maxAllowedCorruptBlocks

Max number of consecutive blocks with a failed checksum that we'll tolerate.

Value

Author(s)

Evgeny Mirkes <em322@leicester.ac.uk> Lena Kushleyeva Vincent van Hees <v.vanhees@accelting.com>

Examples

  
    cwafile  = system.file("testfiles/ax3_testfile.cwa", package = "GGIRread")[1]
    AX3 = readAxivity(filename = cwafile, desiredtz = "Europe/Berlin", start = 1, end = 2)
  

[Package GGIRread version 1.0.0 Index]