The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

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:

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
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
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

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

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.