food_table: Calculate and Summarize Metabolic Response Metrics

View source: R/food_by_meal.R

food_tableR Documentation

Calculate and Summarize Metabolic Response Metrics

Description

This function computes several metrics related to glucose metabolism response for each unique meal from a dataset of glucose measurements. The metrics include incremental area under the curve (iAUC), minimum glucose level, maximum glucose level, and the rise in glucose from beginning to end.

Usage

food_table(foodresults = NULL)

Arguments

foodresults

A data frame containing the glucose measurements. This is typically generated by calling food_times_df with a valid object created by cgm_data and a 'foodname' string. The dataframe should contain columns named 't', 'value', 'meal', and 'control'. 't' should be the time measurements. 'value' should be the glucose measurements. 'meal' identifies unique meals. 'control' is a logical indicating whether an intervention was applied. If this parameter is NULL, the function will return NULL.

Value

A tibble with the following columns: 'Experiment' - name of the meal. 'IAUC' - incremental area under the curve for the glucose response. 'Min' - minimum glucose level. 'Max' - maximum glucose level. 'Rise' - change in glucose from the first to the last measurement. The tibble is sorted in ascending order by IAUC.


personalscience/cgmr documentation built on July 2, 2023, 12:47 a.m.