get_all_nutrient_info: get_all_nutrient_info(foodCode)

Description Usage Arguments Value Examples

View source: R/endpoints.R

Description

Makes queries to the Canadian Nutrient APIs to get all available nutrient information about a particular food.

Usage

1
get_all_nutrient_info(foodCode, apiKey = NULL, lang = "en")

Arguments

foodCode

The code indicating the food you want to search for.

apiKey

Key to access the API. Can be retrieved from https://hc-sc.api.canada.ca/en/detail?api=cnf#!/Nutrient/get_nutrientamount. If none is provided, the system environment variables will be checked.

lang

The language to return results in, can be either 'en' or 'fr'.

Value

A tibble containing all available nutrient information about the food code.

Examples

1
2
3
4
## Not run: 
get_all_nutrient_info(foodCode = 45)

## End(Not run)

jufil19/nutrientr documentation built on Feb. 22, 2022, 9:40 p.m.