September 21, 2019 18:54
tylerburleigh
I wrote an R package called nutritionR that interfaces with the /v2/natural/nutrients endpoint. Using this package, you can query Nutritionix API and extract the sum total for any one of 68 nutrients.
https://github.com/tylerburleigh/nutritionR
For example, let’s say you wanted to know how many calories were in your query “A hamburger with cheese”. You can do this with two of the package functions:
obj <- nutritionix_lookup(“A hamburger with cheese”)
nutrient(obj, “calories”)