- data
DataFrame object with column names "id", "time", and "gl". Should only be data for 1 subject. In case multiple subject ids are detected, the warning is produced and only 1st subject is used.
- short_ma
Integer for period length of the short moving average. Must be positive and less than "long_ma", default value is 5. (Recommended <15)
- long_ma
Integer for period length for the long moving average, default value is 32. (Recommended >20)
- type
One of "plus", "minus", "auto" (Default: auto). Algorithm will either calculate MAGE+ (nadir to peak), MAGE- (peak to nadir), or automatically choose based on the first countable excursion.
- plot
Boolean. Returns ggplot if TRUE.
- 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 as.POSIXct
), but " " is the current time zone, and "GMT" is UTC (Universal Time, Coordinated). Invalid values are most commonly treated as UTC, on some platforms with a warning.
- title
Title for the ggplot. Defaults to "Glucose Trace - Subject [ID]"
- xlab
Label for x-axis of ggplot. Defaults to "Time"
- ylab
Label for y-axis of ggplot. Defaults to "Glucose Level"
- show_ma
Whether to show the moving average lines on the plot or not