Calculates a BMI from height and weight and binds an additional column to the supplied data frame.

add_bmi(df)

Arguments

df

a data frame containing a height and weight column.

Value

a data frame

Examples

df <- data.frame(height = c(70, 72, 64), weight = c(150, 160, 170)) df <- df %>% add_bmi()