This function reads raw files downloaded from accelerometers and stores them in one directory.
readAccDir(path, model, ext = "dat", counts.pos = 1,
tz = "Europe/London", sparse = FALSE,
fault = 32767, save = TRUE, compress = "gzip",
compression_level = 6,...)
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.
path to accelerometer files.
accelerometer model, either 'gt1m' or 'gt3x'.
file extension without '.' (default is 'dat').
position of first measurement of accelerometer counts. See gt1mAccFile
for details.
a character string specifying the timezone to be used for the conversion (see strptime
).
logical flag: should data be stored in sparse format?
numerical value that indicates voltage signal saturation (temporarily used for both accelerometer counts and steps).
either logical or character. If logical, save = TRUE
stores accelerometer files as .Rdata
objects in a new directory ('accRfiles') in path
. If the directory already exists, confirmation for overwriting will be prompted. save = FALSE
stores accelerometer files in current R session. Alternatively, an existing folder can be specified.
logical or character string specifying whether saving to a named file is to use compression if save = TRUE
. See argument compress
in save
.
integer: the level of compression to be used. See argument compression_level
in save
.
not used.
Marco Geraci
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
.
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
gt1mAccFile
, gt3xAccFile
, gt1mAccDir
, gt3xAccDir