Hi there, I'm a new learner in R. had a trouble to sum the data, which showed below
this excel data is named as bwtsmk.
to obtain the sum for value by smoke status, I used the code below, but failed
smk0<-sum(bwtsmk$(value & smoke=0))
which code should I use to get it. appreciate much if someone can help.