Title: | Useful Functions for People on a Diet |
---|---|
Description: | Contains a collection of functions for performing different kinds of calculation that are of interest to someone following a diet plan. Calculators for the Basal Metabolic Rate are based on Mifflin et al. (1990) <doi:10.1093/ajcn/51.2.241> and McArdle, W. D., Katch, F. I., & Katch, V. L. (2010, ISBN:9780812109917). |
Authors: | Waldir Leoncio [aut, cre] |
Maintainer: | Waldir Leoncio <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.1.0 |
Built: | 2024-11-21 04:49:46 UTC |
Source: | https://github.com/wleoncio/nutrition |
Estimates the basal metabolic rate of a person.
bmr(weight, age, fat, height, activity = 1.45, method = "msj", gender = "male")
bmr(weight, age, fat, height, activity = 1.45, method = "msj", gender = "male")
weight |
weight, in kilograms |
age |
age, in years |
fat |
fat proportion in body |
height |
height, in centimeters |
activity |
activity level (a scalar between 1 and 2) |
method |
calculation method ("msj" for Mifflin-St. Jeor or "kma" for Katch-McArdle) |
gender |
"male" or "female" |
The Basal Metabolic Rate, in kilocalories
Waldir Leoncio
https://www.calculator.net/bmr-calculator.html
Mifflin, M. D., St Jeor, S. T., Hill, L. A., Scott, B. J., Daugherty, S. A., & Koh, Y. O. (1990). A new predictive equation for resting energy expenditure in healthy individuals. The American journal of clinical nutrition, 51(2), 241-247.
McArdle, W. D., Katch, F. I., & Katch, V. L. (2010). Exercise physiology: nutrition, energy, and human performance. Lippincott Williams & Wilkins.
bmr(67, 40, .12, 178) # for an individual with 12% body fat
bmr(67, 40, .12, 178) # for an individual with 12% body fat
Calculates a calorie budget
budget(wt_delta_per_week, bmr)
budget(wt_delta_per_week, bmr)
wt_delta_per_week |
expected change in weight per week |
bmr |
Basal Metabolic Rate, in kilocalories |
Calorie targets per day
Waldir Leoncio
https://help.loseit.com/hc/en-us/articles/115007245847-How-the-Calorie-Budget-is-Calculated
BMR <- bmr(66, 40, .12, 178, method = "kma") budget(0, BMR) # for weight maintenance with a weekend bonus budget(.25, BMR) # for a slight weight gain
BMR <- bmr(66, 40, .12, 178, method = "kma") budget(0, BMR) # for weight maintenance with a weekend bonus budget(.25, BMR) # for a slight weight gain
Calculates how much of the energy content comes from carbohydrates.
carbPct(fat, carbs, protein, fiber = 0, kcal = 0)
carbPct(fat, carbs, protein, fiber = 0, kcal = 0)
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) |
kcal |
total energy per unit of measurement (e.g. 100 g) |
percentage of energy from carbs
Waldir Leoncio
carbPct(57, 11, 19, 8)
carbPct(57, 11, 19, 8)
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)
fiberGrams(kcal, fat, carbs, protein)
kcal |
total energy per unit of measurement (e.g. 100 g) |
fat |
grams of fat per unit of measurement (e.g. 100 g) |
carbs |
grams of carbohydrate per unit of measurement (e.g. 100 g) |
protein |
grams of protein per unit of measurement (e.g. 100 g) |
Grams of fiber per unit of measurement
Waldir Leoncio
fiberGrams(362, 17, 11, 40)
fiberGrams(362, 17, 11, 40)
Calculates the percentage of energy from each macronutrient.
macroDistro(fat, carbs, protein, fiber = 0)
macroDistro(fat, carbs, protein, fiber = 0)
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) |
vector with the energy ratio from each macronutrient
Waldir Leoncio
macroDistro(12, 40, 32, 1) macroDistro(12, 40, 32)
macroDistro(12, 40, 32, 1) macroDistro(12, 40, 32)
Table of hour of day and percentage of day
pct_of_day
pct_of_day
An object of class data.frame
with 25 rows and 2 columns.
Calculate the total caloric content of an item given the weight of its macronutrients
totalKcal(fat, carbs, protein, fiber = 0)
totalKcal(fat, carbs, protein, fiber = 0)
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) |
Total energy content per unit of measurement
Waldir Leoncio
totalKcal(48, 1.7, 29)
totalKcal(48, 1.7, 29)