Description Usage Arguments Value Examples
Makes a query to the Canadian Nutrient File nutrientsource endpoint. This endpoint returns a list of nutrient source id's and their corresponding description.
1 | get_nutrientsource(apiKey = NULL, nutrientSourceId = 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. |
nutrientSourceId |
The code indicating the nutrient source you want to search for. If null, all nutrient sources are returned. |
lang |
The language to return results in, can be either 'en' or 'fr'. |
A tibble containing the id's of nutrient sources as well as their corresponding description.
1 2 3 4 5 | ## Not run:
get_nutrientsource()
get_nutrientsource(nutrientSourceId = 108)
get_nutrientsource(nutrientSourceId = 108, lang = "fr")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.