Description Usage Arguments Value Examples
Makes a query to the Canadian Nutrient File refuseamount endpoint. This endpoint returns a list of refuse amounts and name as well as the corresponding food code and description. Refuse amounts correspond to the inedible portion of the food. For instance, searching for food code 557 (Chicken, broiler, meat, skin, giblets and neck) will return a refuse amount of 28 and its associated name is 'bone'.
1 | get_refuseamount(apiKey = NULL, foodCode = 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_nutrientamount. If none is provided, the system environment variables will be checked. |
foodCode |
The code indicating the food you want to search for. If null, all foods and their corresponding refuse amounts are returned. |
lang |
The language to return results in, can be either 'en' or 'fr'. |
A tibble containing refuse name, refuse amount, food names and food codes.
1 2 3 4 5 | ## Not run:
get_refuseamount()
get_refuseamount(foodCode = 557)
get_refuseamount(foodCode = 557, lang = "fr")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.