Sometimes, nutritional labels fail to inform the amount of fiber it contains. This function helps one estimate this given other parameters.
fiberGrams(kcal, fat, carbs, protein)
total energy per unit of measurement (e.g. 100 g)
grams of fat per unit of measurement (e.g. 100 g)
grams of carbohydrate 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
fiberGrams(362, 17, 11, 40)
#> [1] 5