Description Usage Arguments Examples
Gets the sum of a single nutrient from a nutrition object. For example, gets the total calories or total fat. For a list of nutrients available, see 'data(nutrients)'.
1 |
obj |
The nutrition object – a list returned by the 'nutritionix_lookup()' function. |
nutrient |
The nutrient to extract from the nutrition object. Must be one of the nutrients in 'data(nutrients)', such as : "calories", "fat", "carbs", "fiber", "sugar", etc |
1 2 3 4 5 6 7 | ## Not run:
obj <- nutritionix_lookup("1 cheeseburger")
nutrition(obj, "calories")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.