bmi: Compute body mass index (BMI)

Description Usage Arguments Value See Also Examples

View source: R/bmi.R

Description

bmi calculates the BMI in kilograms per meter squared.

Usage

1
bmi(mass, height)

Arguments

mass, height

A numerical vector with body mass and height data. mass unit must be kilograms and height unit must be meters. If the height unit is centimeters, it is converted to meters before BMI computation and a warning is shown.

Value

Returns a double vector with the element-wise body mass index (BMI).

See Also

bmi_cat()

Examples

1
2
3
4
mass <- sample(50:100, 20)
height <- rnorm(20, mean = 1.7, sd = 0.2)

bmi(mass, height)

lvmisc documentation built on April 5, 2021, 5:06 p.m.