add_bmi: Add BMI column

Description Usage Arguments Value Examples

View source: R/util-cols.R

Description

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

Usage

1

Arguments

df

a data frame containing a height and weight column.

Value

a data frame

Examples

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

dylanrussellmd/nsqipBileSpill documentation built on Dec. 20, 2021, 2:17 a.m.