Process Raw data to Counts
Usage
acti_process(
data,
lfe_select = FALSE,
method = c("choi", "troiano"),
use_magnitude = TRUE,
calibrate = FALSE,
verbose = TRUE,
...,
min_required = 1368L,
round_digits = NULL
)Arguments
- data
A
data.framefromacti_calculate_countsthat has columnsaxis1-3andcounts- lfe_select
Apply the Actigraph Low Frequency Extension filter. See agcounts::calculate_counts
- method
Method for detecting non-wear, either "choi" or "troiano", corresponding to
actigraph.sleepr::apply_choi()oractigraph.sleepr::apply_troiano()- use_magnitude
If
TRUE, the magnitude of the vector (axis1, axis2, axis3) is used to measure activity; otherwise the axis1 value is used.- calibrate
Logical. If
TRUE, the data will be calibrated usingacti_calibrate()- verbose
print diagnostic messages. Either logical or integer, where higher values are higher levels of verbosity.
- ...
additional arguments to pass to
actigraph.sleeprfunction- min_required
Number of minutes required in a day to be called
included. No day inclusion is run ifNULL.- round_digits
Number of decimal places
X/Y/Zare rounded to (half away from zero) after resampling to 30Hz and before counting. The defaultNULLuses3for GT3X data (read withactiread::acti_read_gt3x()) and does not round other data. UseNAto never round.
Details
To match ActiLife for GT3X files, a GT3X path is read with
digits = 8 (unless digits is given in ...), resampled, and then
rounded to 3 digits. ActiLife rounds the scaled samples to 3 digits, half
away from zero. Reading at 8 digits and then rounding gives exactly those
values, but rounding values already read at 5 digits does not
(e.g. 0.1234996 -> 0.12350 -> 0.124).
Note
For acti_process, the ... argument are passed to
actiread::acti_read_gt3x()