I'm having a lot of trouble trying to code a line graph with two lines in R, as I am incredibly new, and a lot of the material I have viewed is making me rather confused. I'm trying to make one looking at infant birthweight between smokers and non smokers. I have an CSV file with ~189 people in. I hope to have age on the X axis, the birthweight on the Y, and two lines on the graph - one for smokers, and one for non smokers.
I have the data saved as data, and age is data$AGE, birthweight is data$BWT, and smoking status is data$SMOKE. Also, in the CSV file '0' signifies a non smoker, and '1' signifies a smoker.
If there is a way to make one like I described in Excel that would be equally great.
Thank you so much in advance.