README.md

befitteR

CRAN
status Travis build
status AppVeyor build
status Codecov test
coverage GPLv3
license Last-changedate Lifecycle:
experimental

Calculate health, fitness, food and body related statistics individually or using a report.

Installation

# Install from github using the `remotes` package
install.packages("remotes")
remotes::install_github("marijnjaboer/befitter")

Usage

Most of the functions of befitteR start with calcalate_*. While most of the functions calculate the output using a known equation, some take an equation parameter so a desired equation can be set.

Examples

library(befitteR)

calculate_bmi(
  weight = 70,
  height = 180
  )
#> [1] 21.60494

calculate_rmr(
  weight = 70,
  height = 180,
  age = 30,
  sex = "male",
  bfp = 15,
  equation = "revised-harris-benedict"
  )
#> [1] 1719.662

calculate_ideal_weight(
  height = 180,
  desired_bmi = 23,
  equation = "peterson"
  )
#> [1] 74.75

calculate_macros(
  tdee = 2800,
  balance = c(
    c = 0.05, 
    p = 0.25, 
    f = 0.7
    )
  )
#>      c      p      f 
#>  35.00 175.00 217.78

calculate_plates(
  lift = 92.5, 
  bar = 20, 
  plates = c(1.25, 2.5, 5, 10, 20)
  )
#> Plates needed per side:
#> [1] 20.00 10.00  5.00  1.25

Reports

You can create a themed report using a set of parameters. For now you can use a body or kcal report, with statistics as bmi, healthy or ideal weight, body fat percentage and more.

This part of the package will be expanded in the future…

# Code is not run
create_report(
  output = "test-body.html",
  title = "Body statistics",
  template_name = "body",
  params = list(
    weight = 80,
    height = 180,
    sex = "male",
    age = 30,
    waist = 80,
    neck = 35,
    hip = 50,
    desired_bmi = 23,
    squat = 80,
    bench = 50
  ),
  quiet = TRUE,
  see_now = FALSE
)

Code of Conduct

Please note that the ‘befitteR’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Icon

The hex sticker icon was inspired by an image from Freepik from www.flaticon.com and is licensed by CC 3.0 BY


MarijnJABoer/befitteR documentation built on April 24, 2020, 5:43 a.m.