cgm_auc {rGV} | R Documentation |
Calculate area under the curve (AUC)
Description
Calculate area under the curve (AUC)
Usage
cgm_auc(x, times, thresh = 100, above = TRUE)
Arguments
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. |
Value
The numeric area under the curve value for a given dataset of glucose measurements and times.
Examples
cgm_auc(x=c(rep(100, 10), rep(120, 10), 105, 85), times=seq(0, 1260, 60), thresh=110, above=TRUE)
[Package rGV version 0.0.4 Index]