getFoodGroups: Get the names of the food groups included in a given database

View source: R/Search_functions.R

getFoodGroupsR Documentation

Get the names of the food groups included in a given database

Description

This function returns the names of the different food groups included in a given database.

Usage

getFoodGroups(food_database = "USDA")

Arguments

food_database

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

Value

A vector of food groups.

Examples

## Load data
data(food_composition_data)

## Get food groups from USDA
getFoodGroups("USDA")

## Get food groups from CIQUAL
getFoodGroups("CIQUAL")

## Get food groups from BEDCA
getFoodGroups("BEDCA")

## Get food groups from CNF
getFoodGroups("CNF")

AndreaRMICL/NutrienTrackeR documentation built on July 5, 2023, 10:56 p.m.