cgm_auc | R Documentation |
Calculate area under the curve (AUC)
cgm_auc(x, times, thresh = 100, above = TRUE)
x |
vector of glucose readings |
times |
vector of corresponding times, in minutes |
thresh |
threshold above (or below) which you wish to calculate the AUC. Default is 100. |
above |
logical indicating whether you wish to calculate area above the threshold value (TRUE) or below it (FALSE). Default is TRUE. |
The numeric area under the curve value for a given dataset of glucose measurements and times.
cgm_auc(x=c(rep(100, 10), rep(120, 10), 105, 85), times=seq(0, 1260, 60), thresh=110, above=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.