I've searched through some of the previous posts on this subject and haven't found something to answer my question.
I'm doing the following:
brfss2013[, "hExcellent"] <- ifelse(brfss2013$genhlth == 'Excellent') 1, 0
Error: unexpected numeric constant in "brfss2013[, "hExcellent"] <- ifelse(brfss2013$genhlth == 'Excellent') 1"
Not sure what the problem is. I'm simply trying to place a 1 or 0 in my new column based on what my evaluation of the condition is.
Any help is appreciated. Thanks.