View source: R/01a_common_functions.R
| parse_data | R Documentation |
Iterates over one or more paths, discovers all contained files (including inside ZIP archives), and dispatches each file to the appropriate format-specific reader. Supported formats are Glooko, CareLink, mylife, Tidepool, YourLoops, Tandem Source and Dexcom Clarity.
parse_data(id, paths, clean = TRUE, ...)
id |
Character or numeric participant identifier. Used for logging and
stored in the |
paths |
Character vector. One or more file or directory paths to search for data files. Directories are traversed recursively; ZIP archives are extracted automatically. |
clean |
Logical, if |
... |
Additional arguments passed on to the format-specific cleaning
methods, e.g. |
A list with all data found for one individual, merged per data type
and sorted by timestamp. Duplicate rows are removed. Rows removed
during cleaning are stored in the attribute removed, see
removed_entries. NULL if no valid data files were found.
path <- system.file("extdata", "glooko_example.zip", package = "aidR")
# Raw data, as found in the export
data_raw <- parse_data(id = "1", paths = path, clean = FALSE)
names(data_raw)
head(data_raw$cgm)
# Cleaned and standardized data
data <- parse_data(id = "1", paths = path)
names(data)
head(data$cgm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.