food_by_meal: Process Food Results by Meal

View source: R/food_by_meal.R

food_by_mealR Documentation

Process Food Results by Meal

Description

This function takes a food results dataframe and processes it by grouping it by meal, arranging it by time ('t'), and adjusting the 'value' column to start from zero for each meal. The resulting dataframe is arranged by 'meal'.

Usage

food_by_meal(foodresults = NULL)

Arguments

foodresults

A dataframe of food results. It should contain at least the following three columns: 't' (numeric, representing time), 'value' (numeric, representing the value associated with each time point), and 'meal' (character, representing the meal associated with each time point). Typically, foodresults is a dataframe created after calling food_times_df with a valid object created with cgm_data and a 'foodname' string.

Value

A dataframe of the processed food results, arranged by 'meal'.


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