What's BMI?
How to calculate BMI for adult?
How to interprete BMI result?
| BMI | Weight Status |
|---|---|
| Below 18.5 | Underweight |
| 18.5 – 24.9 | Normal |
| 25.0 – 29.9 | Overweight |
| 30.0 and Above | Obese |
BMI <- function(w,h){round(w / (h)^2,1)}
weightstatus <- function(w, h) { BMI <- round(w / (h)^2,2)
if ( BMI < 18.50) {wstatus <- 'Underweight'}
else if ( BMI < 25.00 ) {wstatus <- 'Normal'}
else if ( BMI < 30.00) {wstatus <- 'Overweight'}
else {wstatus <- 'Obese'}
return(wstatus) }
#Example: Weight = 68 kg, Height = 1.65 m;
BMI(68,1.65);weightstatus(68, 1.65)
[1] 25
[1] "Normal"