aidR: mylife export format

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(aidR)
path <- system.file("extdata", "mylife_example.csv", package = "aidR")

Overview

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

writeLines(readLines(path, n = 10))

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)

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)
head(data$Kohlenhydrate)
head(data$`Blutzucker manuelle Eingabe`)

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



Try the aidR package in your browser

Any scripts or data that you put into this service are public.

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