tdee: A TDEE calculator for R.

Description Usage Arguments Details Value Examples

Description

Calculate your basal metabolic rate (BMR), total daily energy expenditure (TDEE), and calorie goals to lose, maintain, or gain weight. Also calculate adjusted values for every kg interval between your current and goal weight.

Usage

1
tdee(height, weight, age, sex, activity, aim, goal = NULL)

Arguments

height

Your height in centimetres. Returns a warning message to check unit of measurement if over 250 or under 100.

weight

Your weight in kilograms. Returns a warning message to check units of measurement if over 250 or under 30.

age

Your age in years. Returns a warning message to check units of measurement if over 100.

sex

Your biological sex. Throws an error if not 'male' or 'female'.

activity

Your activity level. Are you 'sedentary', or 'lightly', 'moderately', 'very' or 'extremely' active? Throws an error if not one of these options (do not include the word 'active', just the adverbs).

aim

Your weight aim. Do you want to 'lose', 'maintain', or 'gain' weight? Throws an error if not one of these options

goal

An optional argument specifying a goal weight. If specified, 'tdee' runs calculations at each weight between your current and goal weight to show how calorie consumption needs to be adapted over time.

Details

tdee calculates your BMR, TDEE, and calorie requirements based on your height, weight, age, sex, activity levels and weight aims. The calculations are based on this post: https://steelfitusa.com/2018/10/calculate-tdee/

Value

A dataframe with columns weight, bmr, tdee, and calories

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# my own calculation
tdee(height = 182,
     weight = 84,
     age = 23,
     sex = "male",
     activity = "moderately",
     aim = "gain",
     goal = 89)
# alternatively without arg names
tdee(182, 84, 23, "male", "moderately", "gain", 89)
# a 150 cm, thirty-year-old woman weighing ninety kilograms, who is
# sedentary and wants to lose weight
tdee(height = 150,
     weight = 90,
     age = 30,
     sex = "female",
     activity = "sedentary",
     aim = "lose")
# plot adjustments towards goal weight
tdee_track <- tdee(182, 84, 23, "male", "moderately", "gain", 89)
ggplot(tdee_track, mapping = aes(x = weight, y = calories)) +
  geom_line() +
  geom_point()

mbarnfield/tdeer documentation built on June 2, 2019, 9:07 p.m.