totalKcal {nutrition} | R Documentation |
Total calories
Description
Calculate the total caloric content of an item given the weight of its macronutrients
Usage
totalKcal(fat, carbs, protein, fiber = 0)
Arguments
fat |
grams of fat per unit of measurement (e.g. 100 g) |
carbs |
grams of carbohydrates per unit of measurement (e.g. 100 g) |
protein |
grams of protein per unit of measurement (e.g. 100 g) |
fiber |
grams of fiber per unit of measurement (e.g. 100 g) |
Value
Total energy content per unit of measurement
Author(s)
Waldir Leoncio
Examples
totalKcal(48, 1.7, 29)
[Package nutrition version 1.1.0 Index]