Process Count Data
Source:R/ab_calculate_counts.R, R/acti_count_measures.R
acti_calculate_counts.RdProcess Count Data
Process Count Data
Usage
acti_calculate_counts(
data,
epoch = 60L,
resample = TRUE,
lfe_select = FALSE,
verbose = TRUE
)
acti_calculate_wear(
data,
method = c("choi", "troiano"),
use_magnitude = TRUE,
...
)
acti_calculate_nonwear(
data,
method = c("choi", "troiano"),
use_magnitude = TRUE,
...
)
acti_apply_cole_kripke(data)
acti_apply_tudor_locke(data, ...)
acti_apply_sadeh(data, ...)Arguments
- data
A
data.framefromacti_calculate_countsthat has columnsaxis1-3andcounts- epoch
epoch length in seconds. Default is 60 seconds. See
agcounts::calculate_counts()- resample
(recommended) resample the data to 30Hz using actibase::acti_resample vs. using the resampling method from agcounts::calculate_counts.
- lfe_select
Apply the Actigraph Low Frequency Extension filter. See
agcounts::calculate_counts()higher values are higher levels of verbosity.- verbose
print diagnostic messages. Either logical or integer, where
- 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.- ...
additional arguments to pass to
actigraph.sleeprfunction
Value
A data.frame of transformed data
A data.frame of transformed data with columns axis1-3,
counts, and counts_log10.
A data.frame of transformed data
Examples
# \donttest{
path = actiread::acti_example_gt3x()
ac = actiread::acti_read_gt3x(path)
#> ℹ Filling zeros in data
#> ✔ Filled zeros in data
#> ℹ Timezone not applied to data
out = acti_calculate_counts(ac)
#> Downloading uv...
#> Done!
#> [1] "Creating Downsampled Data"
#> [1] "Filtering Data"
#> [1] "Trimming Data"
#> [1] "Getting data back to 10Hz for accumulation"
#> [1] "Summing epochs"
# }
data = actimetrics::acti_count_data
wear = actimetrics::acti_calculate_wear(data)
tro_wear = actimetrics::acti_calculate_wear(data, method = "troiano")
ck = actimetrics::acti_apply_cole_kripke(data)
tl = actimetrics::acti_apply_tudor_locke(ck)
sadeh = actimetrics::acti_apply_sadeh(ck)