View source: R/06_conversions.R
| get_cgmquantify_format | R Documentation |
Builds the data frame that the metric functions of the R-package
cgmquantify
expect, with columns Time, glucose, Date, time_of_day and
type_of_event. This is the same layout that cgmquantify::readfile()
produces from a Dexcom export.
get_cgmquantify_format(data, id = NULL)
data |
A list with all data found for one individual (the output of
|
id |
Character or numeric participant identifier, naming the individual
to convert. Can be omitted if |
Note that cgmquantify always related to a single subject.
A data frame with columns Time (POSIXct), glucose
(mg/dL), Date, time_of_day and type_of_event
(1 above 180 mg/dL, -1 below 70 mg/dL and 0 in
between), sorted by time and compatible with the R-package cgmquantify.
path <- system.file("extdata", "dexcom_clarity_example.csv", package = "aidR")
data <- parse_data(id = "1", paths = path)
cgmquantify_df <- get_cgmquantify_format(data)
cgmquantify::summary_glucose(cgmquantify_df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.