- Why is it needed?
- A woman's weight and height will exert an influence on how much she would gain weight during pregnancy
- We use "body mass index," or BMI as measurement metrics
Cynthia Li
Data scientist
pBMI<-function(Weight,Height) {
if (Weight==0 | Height==0) return(NA)
else return(round(Weight/(Height/100)^2,1))
}
The user selects the relevant values using a sidebar panel.
BMI is calculated in the main panel using the formula in previous slide(embedded R code)
The user's recommended pregnancy weight gain will be printed.