A vectorised function to calculate adult ideal body weight based on height and sex. This function assumes ideal BMI of 21.5 for females and 23 for males.
ibw(height, sex)
| height | numeric vector of heights in cm |
|---|---|
| sex | character vector of sex ("F" for female or "M" for male) |
numeric vector of ideal body weights in kg
ibw(height = 183, sex = "M")#> [1] 77.0247