Title: | Useful Functions for People on a Diet |
Version: | 1.1.0 |
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). |
License: | GPL (≥ 3) |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
URL: | https://wleoncio.github.io/nutrition/ |
BugReports: | https://github.com/wleoncio/nutrition/issues |
Date: | 2023-09-28 |
NeedsCompilation: | no |
Packaged: | 2023-09-28 10:02:30 UTC; waldir |
Author: | Waldir Leoncio |
Maintainer: | Waldir Leoncio <w.l.netto@medisin.uio.no> |
Repository: | CRAN |
Date/Publication: | 2023-09-28 10:20:02 UTC |
Basal Metabolic Rate
Description
Estimates the basal metabolic rate of a person.
Usage
bmr(weight, age, fat, height, activity = 1.45, method = "msj", gender = "male")
Arguments
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" |
Value
The Basal Metabolic Rate, in kilocalories
Author(s)
Waldir Leoncio
References
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.
Examples
bmr(67, 40, .12, 178) # for an individual with 12% body fat
Calorie budget
Description
Calculates a calorie budget
Usage
budget(wt_delta_per_week, bmr)
Arguments
wt_delta_per_week |
expected change in weight per week |
bmr |
Basal Metabolic Rate, in kilocalories |
Value
Calorie targets per day
Author(s)
Waldir Leoncio
References
https://help.loseit.com/hc/en-us/articles/115007245847-How-the-Calorie-Budget-is-Calculated
Examples
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
Percentage of carbs in food
Description
Calculates how much of the energy content comes from carbohydrates.
Usage
carbPct(fat, carbs, protein, fiber = 0, kcal = 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) |
kcal |
total energy per unit of measurement (e.g. 100 g) |
Value
percentage of energy from carbs
Author(s)
Waldir Leoncio
Examples
carbPct(57, 11, 19, 8)
Calculate the amount of fiber in food
Description
Sometimes, nutritional labels fail to inform the amount of fiber it contains. This function helps one estimate this given other parameters.
Usage
fiberGrams(kcal, fat, carbs, protein)
Arguments
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) |
Value
Grams of fiber per unit of measurement
Author(s)
Waldir Leoncio
Examples
fiberGrams(362, 17, 11, 40)
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)
Table of hour of day and percentage of day
Description
Table of hour of day and percentage of day
Usage
pct_of_day
Format
An object of class data.frame
with 25 rows and 2 columns.
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)