Categorizes BMI values into 4 or 6 clinical categories as ordered factors, with "Healthy Weight" as the reference level.
Examples
df <- tibble::tibble(bmi = c(17, 22, 27, 32, 37, 42, NA))
df %>% dplyr::mutate(
bmi_cat4 = categorize_bmi(bmi, levels = 4),
bmi_cat6 = categorize_bmi(bmi, levels = 6)
)
#> Error in df %>% dplyr::mutate(bmi_cat4 = categorize_bmi(bmi, levels = 4), bmi_cat6 = categorize_bmi(bmi, levels = 6)): could not find function "%>%"
