knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The R package 'iglu' provides functions for outputting relevant metrics for data collected from Continuous Glucose Monitors (CGM). For reference, see "Interpretation of continuous glucose monitoring data: glycemic variability and quality of glycemic control." Rodbard (2009). For more information on the package, see package website.
To cite:
Broll S, Urbanek J, Buchanan D, Chun E, Muschelli J, Punjabi N and Gaynanova I (2021). Interpreting blood glucose data with R package iglu. PLoS One, Vol. 16, No. 4, e0248560.
Broll S, Buchanan D, Chun E, Muschelli J, Fernandes N, Seo J, Shih J, Urbanek J, Schwenck J, Gaynanova I (2021). iglu: Interpreting Glucose Data from Continuous Glucose Monitors. R package version 3.0.0.
iglu comes with two example datasets: example_data_1_subject and example_data_5_subject. These data are collected using Dexcom G4 CGM on subjects with Type II diabetes. Each dataset follows the structure iglu's functions are designed around. Note that the 1 subject data is a subset of the 5 subject data. See the examples below for loading and using the data.
The R package 'iglu' is available from CRAN, use the commands below to install the most recent Github version.
# Plain installation devtools::install_github("irinagain/iglu") # iglu package # For installation with vignette devtools::install_github("irinagain/iglu", build_vignettes = TRUE)
library(iglu) data(example_data_1_subject) # Load single subject data ## Plot data # Use plot on dataframe with time and glucose values for time series plot plot_glu(example_data_1_subject) # Summary statistics and some metrics summary_glu(example_data_1_subject) in_range_percent(example_data_1_subject) above_percent(example_data_1_subject, targets = c(80,140,200,250)) j_index(example_data_1_subject) conga(example_data_1_subject) # Load multiple subject data data(example_data_5_subject) plot_glu(example_data_5_subject, plottype = 'lasagna', datatype = 'average') below_percent(example_data_5_subject, targets = c(80,170,260)) mage(example_data_5_subject)
Shiny App can be accessed locally via
library(iglu) iglu_shiny()
or globally at https://irinagain.shinyapps.io/shiny_iglu/. As new functionality gets added, local version will be slightly ahead of the global one.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.