Error in model.frame.default(formula = bmi ~ age, drop.unused.levels = TRUE) :
variable lengths differ (found for 'age')
This error message is mainly due to the fact that either bmi or age has different number of NA observations. The first step is to remove the NAs from the data frame at hand