macroDistro {nutrition} | R Documentation |
Macro distribution
Description
Calculates the percentage of energy from each macronutrient.
Usage
macroDistro(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
vector with the energy ratio from each macronutrient
Author(s)
Waldir Leoncio
Examples
macroDistro(12, 40, 32, 1)
macroDistro(12, 40, 32)
[Package nutrition version 1.1.0 Index]