Ifelse to recode?

I solved it. My syntax was incorrect.