aidR: mylife export format

library(aidR)

Overview

A mylife export is a single semicolon-delimited .csv file with eight columns:

"Tag";"Datum";"Uhrzeit";"Ereignis";"Wert";"Einheit";"Information";"Notiz"
"Fr.";"16.01.26";"08:01";"Boost";" 46 min.";;"Dauer:  46 min.Startzeit: 08:01 | Endzeit: 08:47";
"Fr.";"16.01.26";"09:05";"Kohlenhydrate";"42";"g KH";;
"Fr.";"16.01.26";"09:06";"Bolus";"4,40";"U";"Bolusvorschlag: 4.40 U";
"Fr.";"16.01.26";"09:22";"Bolus";"4,40";"U";"Bolusvorschlag: 4.40 U";
"Fr.";"16.01.26";"09:22";"Kohlenhydrate";"42";"g KH";;
"Fr.";"16.01.26";"10.00";"Auto mode An";"N/A";;"Startdatum: 16.01.26 10.00Endtermin: 16.01.26 19:44";
"Fr.";"16.01.26";"11:29";"Ease-off";" 30 min.";;"Dauer:  30 min.Startzeit: 11:29 | Endzeit: 11:59";
"Fr.";"16.01.26";"12:17";"Bolus";"6,60";"U";"Bolusvorschlag: 5.60 U";
"Fr.";"16.01.26";"12:17";"Kohlenhydrate";"60";"g KH";;

Each event represents a single row. Both the column headers and the event labels are language-specific and vary with the language of the user’s account (the example above is in German).

How aidR detects this format

Because the headers in a mylife export are language-specific, aidR cannot identify a file from its header names. It relies instead on the structure of the header row, which is delimited by semicolons ; and must split into exactly eight columns. For the same reason, event types are not matched by their labels either: bolus rows are recognized by a unit starting with U, and carbohydrate rows by a unit starting with g.

Entries and the data types they produce

To inspect the raw entries, we parse the export with clean = FALSE, which returns the full information provided by mylife:

data <- parse_data(id = "1", paths = path, clean = FALSE)
#> Parsing data for id 1...

All entries are preserved as-is under their original, language-specific label, so nothing in the export is lost. Possible labels include:

  • Bolus entries: insulin boluses. German label e.g. Bolus; unit U.
head(data$Bolus)
            timestamp  type amount units            information note
1 2026-01-16 09:06:00 Bolus   4,40     U Bolusvorschlag: 4.40 U   NA
2 2026-01-16 09:22:00 Bolus   4,40     U Bolusvorschlag: 4.40 U   NA
3 2026-01-16 12:17:00 Bolus   6,60     U Bolusvorschlag: 5.60 U   NA
4 2026-01-16 15:43:00 Bolus   3,55     U Bolusvorschlag: 3.90 U   NA
5 2026-01-16 15:48:00 Bolus   3,55     U Bolusvorschlag: 3.90 U   NA
6 2026-01-16 16:02:00 Bolus   1,70     U Bolusvorschlag: 1.70 U   NA
  • Carbohydrate entries: carbohydrate intake communicated to the pump. German label e.g. Kohlenhydrate; unit g.
head(data$Kohlenhydrate)
            timestamp          type amount units information note
1 2026-01-16 09:05:00 Kohlenhydrate     42  g KH          NA   NA
2 2026-01-16 09:22:00 Kohlenhydrate     42  g KH          NA   NA
3 2026-01-16 12:17:00 Kohlenhydrate     60  g KH          NA   NA
4 2026-01-16 15:43:00 Kohlenhydrate     45  g KH          NA   NA
5 2026-01-16 16:02:00 Kohlenhydrate     15  g KH          NA   NA
6 2026-01-16 18:01:00 Kohlenhydrate     30  g KH          NA   NA
  • Manual blood glucose entries: self-monitored blood glucose (SMBG). German label e.g. Blutzucker manuelle Eingabe; unit mg/dL or mmol/L.
head(data$`Blutzucker manuelle Eingabe`)
            timestamp                        type amount units information note
1 2026-01-16 18:07:00 Blutzucker manuelle Eingabe    190 mg/dL          NA   NA
  • Ease-off (Ease-off): start and duration of Ease-off mode.
  • Boost (Boost): start and duration of Boost mode.
  • Hypo carbohydrate entries: carbohydrates taken to treat hypoglycemia. German label e.g. Hypo Kohlenhydrate; unit g.
  • Auto mode on: start and duration of Auto mode. German label e.g. Auto mode An.
  • Slowly resorbing: carbohydrate intake recorded as slowly resorbing. German label e.g. langsam resorbierbar; unit g.
  • Auto mode loading: start and end of Auto mode loading, including the reason for any interruption. German label e.g. Auto mode lädt.

Note that a mylife export contains no CGM or basal data - bolus, carbs, and SMBG are the only core data types available from this platform.

Cleaning files

When parse_data is run with clean = TRUE, the cleaned data types are built from the following raw files and attributes:

Cleaned data type Used files Used attributes
bolus mylife_example.csv All entries whose unit is U, i.e. bolus entries.
carbs mylife_example.csv All entries whose unit is g, including regular carbohydrates, slowly resorbing carbohydrates, and hypo carbohydrate entries.
SMBG mylife_example.csv All entries whose unit is mg/dL or mmol/L, i.e. manual blood glucose entries.
total_bolus mylife_example.csv The cleaned bolus data, summed per day.

Notes

  • SMBG values may be reported in mg/dL or mmol/L depending on the account settings; aidR converts them to mg/dL automatically.
  • timezone_offset is always NA, since mylife exports report only local (wall-clock) time.
  • There is no total_basal, since a mylife export contains no basal data. total_bolus is summed from the cleaned bolus data and carries source = "summed".
  • estimated_absorption_duration is parsed out of the free-text information column for slowly resorbing carbs (e.g. "... 2h ...") and is NA when not stated.
  • is_hypo_treatment is likewise derived from the information column, by looking for the marker HypoTreatment.
  • label retains the original, language-specific event label, so the source of each carbohydrate entry stays traceable after merging across platforms.
  • link_id is always NA for bolus and carbs: the export does not record which carbohydrate entry triggered which bolus. Matching them by timestamp and amount is not implemented.