Function that calculates BMI (Body Mass Index) based on weight and height inputs.
Usage
calculate_bmi(weight, weight_unit = "kg", height, height_unit = "cm")
Arguments
- weight
Weight value in either kilograms (kg) or pounds (lbs).
- weight_unit
Unit of weight measurement ('kg' or 'lbs').
- height
Height value in either centimeters (cm), meters (m), inches (in), or feet (ft).
- height_unit
Unit of height measurement ('cm', 'm', 'in', or 'ft').
Value
BMI calculated based on the provided weight and height.