getNutrientNames: Get the names of nutrients included in a given database

View source: R/Search_functions.R

getNutrientNamesR Documentation

Get the names of nutrients included in a given database

Description

This function returns the names of all nutrients included in a given database.

Usage

getNutrientNames(food_database = "USDA")

Arguments

food_database

character vector indicating the food database to be used. Possible values are: "USDA", "CIQUAL", "BEDCA", "CNF", "STFCJ".

Value

A vector of nutrient names.

Examples

## Load data
data(food_composition_data)

## Get nutrient names from USDA
getNutrientNames("USDA")

## Get nutrient names from CIQUAL
getNutrientNames("CIQUAL")

## Get nutrient names from BEDCA
getNutrientNames("BEDCA")

## Get nutrient names from CNF
getNutrientNames("CNF")

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