Changelog
Source:NEWS.md
cgmguru 1.2.0
- Added
rebound_events()to detect rebound hypoglycemia and rebound hyperglycemia using cgmguru Level 1 initial events followed by an opposite threshold crossing within 120 minutes. The function returns the preprocessed event grid by default.detect_all_events()includes rebound rows and wide summary columns. - Added
summary_digitstodetect_all_events()to control rounding for numeric summary outputs. The default remains 2 decimal places; useNULLor"none"to return unrounded values. - Added Rcpp-backed
conga_rcpp()for iglu-compatible Continuous Overall Net Glycemic Action (CONGA) calculation. The function interpolates CGM data to a regular day-aligned grid and returns the standard deviation of glucose differences separated bynhours. - Added Rcpp-backed
mage_rcpp()for iglu-compatible Mean Amplitude of Glycemic Excursions (MAGE) calculation. The function supports the moving-average (version = "ma") and legacy standard-deviation (version = "naive") algorithms, segment-level output withreturn_type = "df", andavg/service/max/plus/minusdirection summaries. Plotting options fromiglu::mage()are intentionally not implemented. - Added Rcpp-backed
modd_rcpp()for iglu-compatible Mean of Daily Differences (MODD) calculation. The function uses cgmguru’s iglu-compatible day-grid preprocessing and returns same-time-of-day absolute glucose differences averaged across the requested daylag. - Updated
excursion()episode-start output to include the peak glucose value within 2 hours of the excursion start (maxima_glucose), its time (maxima_time), time to peak in minutes (time_to_peak_min), andmaxima_index. Excursion starts now require both the previous glucose value and the starting glucose value to be at least 70 mg/dL before checking for a rise greater than 70 mg/dL within 2 hours. - Added iglu parity tests for
conga_rcpp(),mage_rcpp(), andmodd_rcpp()using the iglu example CGM datasets.
cgmguru 1.1.1
- Updated
sensor_wear()tests to avoid timezone-dependent one-to-onestart_datecomparisons againstiglu::active_percent()manual windows. Fixed-window sensor wear tests now compare the calculated observed/expected reading counts directly, making the checks stable across DST-sensitive timezones. - Expanded the package-level
cgmguruvignette into a practical CGM analysis guide covering data requirements, sensor wear, event summaries, event-grid inspection, GRID analysis, postprandial maxima workflows, excursions, visualization, and scaling to larger datasets.
cgmguru 1.1.0
CRAN release: 2026-06-09
- Updated
maxima_grid()anddetect_between_maxima()to include all subject IDs inepisode_counts, returning0for subjects with no detected episodes or between-maxima results. - Fixed
detect_all_events()to summarize event counts segment-by-segment after interpolation gaps, preventing events that end at a gap boundary from being merged into the next segment. - Updated extended hypoglycemia event detection to match iglu by requiring duration strictly greater than 120 minutes below 70 mg/dL, rather than greater than or equal to 120 minutes.
- Avoided materializing the standalone hypo-/hyperglycemic event grid when
return_interpolated = FALSE, improving speed and memory use for calls that do not request the interpolated data. - Optimized returned interpolated event grids by preallocating storage, avoiding repeated ID strings in C++ storage, and skipping unused grid metadata.
- Changed
detect_all_events()summary glucose metrics to use original raw CGM values by default, withsummary_metrics_source = "preprocessed"for the previous internal event-grid behavior. - Rounded
detect_all_events()CGM summary metrics and sensor wear outputs to two decimal places. - Added
sensor_wear_ndaystodetect_all_events()to calculatesensor_wear_percentover a fixed retrospective window, such as the last 90 days; when omitted,sensor_wear_percentcontinues to use the original timestamp span. - Updated
sensor_wear()so the default calculation uses each subject’s original timestamp span. Supplyingndaysnow switches to the fixed-window calculation. - Renamed
detect_all_events()return tables tosubject_summaryandglycemic_event_summary. - Renamed
detect_all_events()summary columns for clarity:sensor_wear_percent,*_total_episodes, andavg_minutes_below_54_per_episode;CVis now reported as a percent.
cgmguru 1.0.1
CRAN release: 2026-05-14
- Renamed event count output columns to
total_episodesfor standalone hypo-/hyperglycemic event summaries anddetect_all_events()long-format event output. - Updated documentation, examples, vignettes, and tests to use
total_episodesconsistently.
cgmguru 1.0.0
CRAN release: 2026-05-14
- Added iglu-compatible event-grid interpolation to the event detection pipeline, including automatic reading interval detection, linear interpolation up to
inter_gap, gap masking, and segment-wise event classification. - Added
interpolate_cgm()as a standalone helper for inspecting the interpolated event grid used by glycemic event functions. - Added
sensor_wear()and included observed-data sensor wear indetect_all_events()summary output. - Updated
detect_all_events()to calculate CGM summary metrics on the interpolated event grid while returning event and summary tables only. - Added iglu parity and interpolation-focused tests for glycemic event detection.
cgmguru 0.2.0
CRAN release: 2026-05-07
- Added preset event definitions with
type = "lv1","lv2", and"extended"todetect_hyperglycemic_events()anddetect_hypoglycemic_events(). - Updated event boundary reporting so
end_glucoseandend_indexidentify the final dysglycemic reading immediately before the confirmed recovery period begins. - Renamed public output index columns to singular forms:
indicestoindex,start_indicestostart_index,end_indicestoend_index,max_indicestomax_index, andmin_indicestomin_index. - Added tests for pre-recovery event boundaries in extended hyperglycemic events with 5-minute and 15-minute sampling intervals.