ggir_process | R Documentation |
Run GGIR Processing
ggir_process(df, unit = "1 min", calibrate = TRUE, verbose = TRUE, ...)
df |
An object with columns 'X', 'Y', and 'Z' or an object of class 'AccData' |
unit |
length of time to calculate measures over. a character string
specifying a time unit or a multiple of a unit to be rounded to.
Valid base units are 'second', 'minute', 'hour', 'day', 'week', 'month',
'bimonth', 'quarter', 'season', 'halfyear', and 'year'.
Arbitrary unique English abbreviations as in the |
calibrate |
Run calibration, passed to |
verbose |
print diagnostic messages |
... |
additional arguments to pass to |
A list with all the output elements
## Not run:
files = read.gt3x::gt3x_datapath(2)
path = files[1]
res = read_actigraphy(path)
res = fix_zeros(res)
out = ggir_process(res, desiredtz = "UTC")
sum_data = out$part2$IMP$metashort
m = calculate_mad(res)
m[-(1:10), c("HEADER_TIME_STAMP", "ENMO_t")]
head(sum_data, 20)
sum_data$HEADER_TIME_STAMP = lubridate::as_datetime(sum_data$timestamp)
sum_data = dplyr::left_join(sum_data, m)
cor(sum_data$ENMO, sum_data$ENMO_t)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.