Hi. I'm trying to compare the average baby's birth weights (bwt) among smoking mothers and non-smoking mother. There is a column 'smoke', where 1 represents smoking mothers and 0 represents non-smoking mom. Here is what I have:
babies<-read.table("~/Desktop/babies.txt",header=T)
mean(babies$bwt[babies$smoke==1])
mean(babies$bwt[babies$smoke==0])
And the answers I get are both NA which confuses me, can anyone please help? Thank you so much.