powered by
Makes a query to the Canadian Nutrient File nutrientsource endpoint. This endpoint returns a list of nutrient source id's and their corresponding description.
get_nutrientsource(apiKey = NULL, nutrientSourceId = NULL, lang = "en")
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.
The code indicating the nutrient source you want to search for. If null, all nutrient sources are returned.
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.
# NOT RUN { get_nutrientsource() get_nutrientsource(nutrientSourceId = 108) get_nutrientsource(nutrientSourceId = 108, lang = "fr") # }
Run the code above in your browser using DataLab