Question: Write an R function to calculate the BMI (Body Mass Index) which is defined as Weight in Kg divided by the squared height (in meter).

Write an R function to calculate the BMI (Body Mass Index) which is defined as Weight in Kg divided by the squared height (in meter).

W/H^2=KG/M^2

where BMI is the Body Mass Index, W is the weight in kg and h is the height in meter.

There are two types of inputs:

1) Kg and meter directly 2) foot, inch and pound (i.e., three input variables)

1 inch = 0.0254 meter 1 pound = 0.45359237 kg

Working with R not python

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!