dot-daily_insulin_totals.aidR: The insulin delivered on one day, for the header of the...

.daily_insulin_totals.aidRR Documentation

The insulin delivered on one day, for the header of the therapy panel

Description

Uses the daily totals of data where they are available, since a platform that reports them itself covers insulin that the individual data points may not (e.g. the basal delivered in automated mode by an Omnipod). Where they are absent, the day is summed over the data that is drawn.

Usage

.daily_insulin_totals.aidR(data, id, day, basal, bolus)

Arguments

data

A list with the standardized aidR data frames, named by aidR type (cgm, basal, ...).

id

Character string with the participant identifier.

day

The day to total, as a Date.

basal

The basal data of that individual and that day, or NULL.

bolus

The bolus data of that individual and that day, or NULL.

Value

A named numeric vector with entries basal, bolus and total, in units. An entry is NA where the insulin is not recorded, and total is NA as soon as either part is.


aidR documentation built on Oct. 28, 2026, 5:13 p.m.