gt3xAccFile: Read a single accelerometer file

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/pawacc.R

Description

This function reads Actigraph GT3X and ActiSleep accelerometer files.

Usage

1
2
gt3xAccFile(file, path, fileid, tz = "Europe/London",
	sparse = FALSE, fault = 32767)

Arguments

file

file name including file extension.

path

path to file.

fileid

label for file identifier.

tz

a character string specifying the timezone to be used for the conversion (see strptime).

sparse

logical flag: should data be stored in sparse format?

fault

numerical value that indicates voltage signal saturation.

Details

Raw accelerometer data are processed according to the device data format. See file 'gt3x_sample.dat' in directory '\inst\extdata' of this package.

Value

These functions return an object of two classes: accfile and additional device-specific class (i.e., gt3x).

An object of class accfile is a list containing the following components:

df

A data.frame object with accelerometer values in columns y, x, z, and steps (if present), and coded error for each accelerometer data column. See errorChk for error codes. If sparse = TRUE, all variables of the data frame df are returned as vectors of a matrix in sparse format (see as.matrix.csr for details).

info

A data.frame object with file identifier (fileid), device serial number (serial), number of recorded measurements (nobs), epoch (epoch), accelerometer mode (mode), start date and time (ts_start), time zone (tz), battery voltage (voltage), download date and time (ts_dl).

error_summary

A list object with file identifier (fileid), summary tables of error codes for each accelerometer data column, error code for date (date), and logical flag for odd number of measurements (odd_number) (see details).

Author(s)

Marco Geraci

References

Actigraph (Pensacola, Florida).

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

readAccDir

Examples

1
2

pawacc documentation built on May 29, 2017, 6:10 p.m.