Calculates the percentage of energy from each macronutrient.
macroDistro(fat, carbs, protein, fiber = 0)
grams of fat per unit of measurement (e.g. 100 g)
grams of carbohydrates per unit of measurement (e.g. 100 g)
grams of protein per unit of measurement (e.g. 100 g)
grams of fiber per unit of measurement (e.g. 100 g)
vector with the energy ratio from each macronutrient
macroDistro(12, 40, 32, 1)
#> fat carbs protein fiber
#> 0.272040302 0.403022670 0.322418136 0.002518892
macroDistro(12, 40, 32)
#> fat carbs protein
#> 0.2727273 0.4040404 0.3232323