Learn R Programming

PAutilities (version 1.1.0)

weight_status: Determine weight status from body mass index

Description

Allows users to determine weight status from body mass index (BMI). The function is designed to classify adult weight status, with default settings yielding weight classes defined by the Centers for Disease Control and Prevention (see reference below). Alternatively, the function can be used as a wrapper for get_BMI_percentile to obtain classifications for youth.

Usage

weight_status(BMI = NULL, breaks = c(-Inf, 18.5, 25, 30, 35, 40, Inf),
  labels = c("Underweight", "Healthy Weight", "Overweight", "Class 1 Obese",
  "Class 2 Obese", "Class 3 Obese"), right = FALSE, youth = FALSE, ...)

#get_BMI_percentile(weight_kg, height_cm, age_yrs = NULL, age_mos = NULL, #sex = c("Male", "Female"), BMI = NULL, df = NULL, #output = c("percentile", "classification", "both", "summary"))

Value

a factor reflecting weight status

Arguments

BMI

numeric. The participant body mass index

breaks

numeric vector. The boundaries for each weight class; passed to base::cut, with warnings if -Inf and Inf are not included in the vector.

labels

character vector. The labels for each weight class; passed to base::cut, and should have a length one less than the length of breaks

right

logical. See ?base::cut

youth

logical. Use function as a wrapper for get_BMI_percentile?

...

Arguments passed to get_BMI_percentile

References

https://www.cdc.gov/obesity/adult/defining.html

Examples

Run this code
weight_status(17:42)

Run the code above in your browser using DataLab