all_metrics | R Documentation |
The function all_metrics runs all of the iglu metrics, and returns the results with one column per metric.
all_metrics(data, dt0 = NULL, inter_gap = 45, tz = "", timelag = 15, lag = 1)
data |
DataFrame object with column names "id", "time", and "gl". |
dt0 |
The time frequency for interpolation in minutes, the default will match the CGM meter's frequency (e.g. 5 min for Dexcom). |
inter_gap |
The maximum allowable gap (in minutes) for interpolation. The values will not be interpolated between the glucose measurements that are more than inter_gap minutes apart. The default value is 45 min. |
tz |
A character string specifying the time zone to be used. System-specific (see |
timelag |
Integer indicating the time period (# minutes) over which rate of change is calculated. Default is 15, e.g. rate of change is the change in glucose over the past 15 minutes divided by 15. |
lag |
Integer indicating which lag (# days) to use. Default is 1. |
All iglu functions are calculated within the all_metrics function, and the resulting tibble is returned with one row per subject and a column for each metric. Time dependent functions are calculated together using the function optimized_iglu_functions. For metric specific information, please see the corresponding function documentation.
A tibble object with 1 row per subject and one column per metric is returned.
data(example_data_1_subject)
all_metrics(example_data_1_subject)
# Specify the meter frequency and change the interpolation gap to 30 min
all_metrics(example_data_1_subject, dt0 = 5, inter_gap = 30)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.