get_nutrientgroup | R Documentation |
Makes a query to the Canadian Nutrient File refuseamount endpoint. This endpoint returns a list of all nutrient group ids and their names. For instance, if nutrient group id is mentioned as 5, the corressponding group name is amino acids
get_nutrientgroup(apiKey = NULL, nutrientGroupId = NULL, lang = "en")
apiKey |
Key to access the API. Can be retrieved from https://hc-sc.api.canada.ca/en/detail?api=cnf#!/Nutrient/get_nutrientgroup. If none is provided, the system environment variables will be checked. |
nutrientGroupId |
The code indicating the nutrient group you want to search for. If null, all foods and their corresponding names are returned. |
lang |
The language to return results in, can be either 'en' or 'fr'. |
A tibble containing nutrient group's id, name, order
## Not run: get_nutrientgroup() get_nutrientgroup(nutrientGroupId = 7) get_nutrientgroup(nutrientGroupId = 7, lang = "fr") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.