knitr::opts_chunk$set(message=FALSE, fig.path='figures/')


NutrienTrackeR

Andrea Rodriguez Martinez, Rafael Ayala, Yacine Debbabi, Lara Selles Vidal

Jun 16, 2018


Introduction

Motivation: Diet and nutrition play a key role in the development, prevention and treatment of noncommunicable diseases (NCD), such as type 2 diabetes, obesity or cardiovascular diseases [@lachat2013]. For example, inadequate intake of fruits and vegetables contributes to 2.7 million NCD-related deaths per year[@hall2009]. Food and nutrient databases provide the basic infrastructure for the assessment of diet quality and for the development of food-based dietary guidelines [@ahuja2012; @elmadfa2010].

NutrienTrackeR is a tool set for food information and dietary assessment. It uses food composition data from several reference databases, including: USDA (US), CIQUAL (France), BEDCA (Spain), CIF (Canada) and STFCJ (Japan). NutrienTrackeR calculates the intake levels for both macronutrients and micronutrients, and compares them with the recommended dietary allowances. It also includes a number of visualization tools, such as time series plots of nutrient intake, or pie-charts showing the main foods contributing to the intake levels of a given nutrient.

Installation instructions

Before installing NutrienTrackeR, please make sure you have the latest version of R is installed. To install NutrienTrackeR, start R and enter:

wzxhzdk:1

Once installed, the package can be loaded as shown below:

wzxhzdk:2
# Food composition datasets

NutrienTrackeR includes three different food composition tables, which provide information on the average nutritional value of foods consumed in the United States (USDA standard reference database), France (CIQUAL database) and Spain (BEDCA database). All nutritional values are provided per 100 grams of food.

wzxhzdk:3

NutrienTrackeR includes a series of functionalities to facilitate the manipulation of these datasets. For example, the function getNutrientNames() gets the names of all the nutrients included in a given food composition table.

wzxhzdk:4

The function subsetFoodRichIn() selects the foods with the highest content of a nutrient of interest.

wzxhzdk:5

The function findFoodName() searches for food names based on query keywords.

wzxhzdk:6

# Dietary assessment tools ## Preparing the input

NutrienTrackeR allows assessing the dietary intake of an individual, based on the food composition database of choice (i.e. USDA, CIQUAL or BEDCA). For this, the user needs to provide a matrix or a list of matrices, where each matrix reports all the foods eaten in a given day. The matrix must have two columns: 1) "food", reporting food names; and 2) "units", reporting the number of units eaten (1 unit = 100 grams of food). The dataset sample_diet_USDA is an example of a one-week diet, using foods from the USDA database.

wzxhzdk:7

## Nutrient calculator

The function dietBalance() calculates the daily nutrient intake of an individual and compares it with the NIH recommendations (recommended dietary allowances (RDA) and tolerable upper intake levels (TUIL)). The nutrient requirements are dependent on age and gender, and therefore these parameters need to be specified when using the function dietBalance(). In this example, we will calculate the nutrient intake from the dataset sample_diet_USDA, assuming that this data was provided by a 27-year old women.

wzxhzdk:8

## Visualization tools

The output of dietBalance() can be visualized with several functions. For instance, nutrientIntakePlot() generates a barplot of nutrient intake levels.

wzxhzdk:9

The function nutrientPiePlot() generates a pie-chart showing the relative contribution of each food to the total intake of a given nutrient.

wzxhzdk:10

The function nutrientsTimeTrend() allows visualizing time trends of nutrient intake levels.

wzxhzdk:11

## Shiny app

A shiny app is available, which can be run locally by executing NutrienTrackeRapp(). Alternatively, the app can be accessed at https://rafaelayala.shinyapps.io/NutrienTrackeR/

# References

Try the NutrienTrackeR package in your browser

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

NutrienTrackeR documentation built on July 26, 2023, 5:22 p.m.