Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.38 KB

README.md

File metadata and controls

52 lines (37 loc) · 1.38 KB

bmicalc

Codecov test coverage R-CMD-check

The goal of bmicalc is to facilitate the rapid assignment of growth percentiles by key demographics. Currently only weight is implemented.

Installation

You can install the development version of bmicalc from GitHub with:

# install.packages("remotes")
remotes::install_github("wf-id/bmicalc")

Example

This is a basic example which shows you how to calculate the weight percentile for an individual:

library(bmicalc)

generate_weight_percentile(sex = "Female", age = 2, weight = 12)
#> [1] 48.32495

If you are at the extremes, you will get a warning message:

generate_weight_percentile(sex = "Female", age = 2, weight = 2000)
#> Warning: The weight, age, and sex you have entered is above the threshold for
#> calculation and is left as 99.9
#> [1] 99.9
generate_weight_percentile(sex = "Female", age = 2, weight = 0.1)
#> Warning: The weight, age, and sex you have entered is below the threshold for
#> calculation and is left NA
#> [1] NA