bweight gestwks hyp sex
1 2974 38.5200004577637 0 female
2 3270 NA 0 male
3 2620 38.150001525878899 0 female
4 3751 39.799999237060497 0 male
5 3200 38.889999389648402 1 male
6 3673 40.970001220703097 0 female
I would like to plot Baby Weight (bweight) against gestation period (gestwks) .
Here is my code for that:
plot(courseworkData1$bweight ~ courseworkData1$gestwks, xlab="Gestation Period", ylab="Baby weight")
But then, I have the "hyp" variable. It is denoted in short for maternal hypertension. I would like to make a plot which would plot the baby weights with hypertension with a different symbol, like a square or something else maybe. How do I do that?

