readAccDir {pawacc} | R Documentation |
Read content of a directory with accelerometer files
Description
This function reads raw files downloaded from accelerometers and stores them in one directory.
Usage
readAccDir(path, model, ext = "dat", counts.pos = 1,
tz = "Europe/London", sparse = FALSE,
fault = 32767, save = TRUE, compress = "gzip",
compression_level = 6,...)
Arguments
path |
path to accelerometer files. |
model |
accelerometer model, either 'gt1m' or 'gt3x'. |
ext |
file extension without '.' (default is 'dat'). |
counts.pos |
position of first measurement of accelerometer counts. See |
tz |
a character string specifying the timezone to be used for the conversion (see |
sparse |
logical flag: should data be stored in sparse format? |
fault |
numerical value that indicates voltage signal saturation (temporarily used for both accelerometer counts and steps). |
save |
either logical or character. If logical, |
compress |
logical or character string specifying whether saving to a named file is to use compression if |
compression_level |
integer: the level of compression to be used. See argument |
... |
not used. |
Details
This is a wrapper function. It reads raw accelerometer files stored in one directory. The argument ext
specifies the extension of the files to look for (e.g., 'dat' or 'txt'). Files with different extension and/or sub-directories are ignored. The data format must be consistent with the specification of model
.
Value
Either a set of .Rdata
files or a list
of objects of class accfile
. In both cases, each accelerometer data file is stored as an object of type list
and labelled using the data file name. See gt1mAccFile
or gt3xAccFile
for details.
Author(s)
Marco Geraci
References
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 https://discovery.ucl.ac.uk/1361699
See Also
gt1mAccFile
, gt3xAccFile
, gt1mAccDir
, gt3xAccDir