read.gt3x_ggir {GGIR} | R Documentation |
Read activity samples from a GT3X file as a matrix.
Please note that all timestamps are in local time (of the device)
even though they are represented as POSIXct
with GMT timezone.
The code in this function is a modified version of the read.gt3x in that it aids batch-loading of modern gt3x files. A pull request has been made to feed these enhancements back into the original code base https://github.com/THLfi/read.gt3x/pull/40. If and when merged we intend to deprecate the GGIR version of the code and make a direct dependency.
read.gt3x_ggir(
path,
verbose = FALSE,
asDataFrame = FALSE,
imputeZeroes = FALSE,
flag_idle_sleep = FALSE,
cleanup = FALSE,
...,
add_light = FALSE
)
path |
Path to gt3x folder |
verbose |
print diagnostic messages |
asDataFrame |
convert to an |
imputeZeroes |
Impute zeros in case there are missingness? Default is FALSE, in which case the time series will be incomplete in case there is missingness. |
flag_idle_sleep |
flag idle sleep mode. If |
cleanup |
should any unzipped files be deleted? |
... |
additional arguments to pass to |
add_light |
add light data to the |
A numeric matrix with 3 columns (X, Y, Z) and the following attributes:
start_time
: Start time from info file in POSIXct
format.
subject_name
: Subject name from info file
time_zone
: Time zone from info file
missingness
: Named integer vector. Names are POSIXct
timestamps and values are the number of missing values.
The timestamps in the .gt3x data format are saved in .NET format, which is
nanoseconds in local time since 0001-01-01.
This is a bit tricky to parse into an R datetime format. DateTimes are
therefore represented as POSIXct
format with the
'GMT' timezone attribute, which is false; the datetime actually
represents local time.