Brand New to R and Need Help with Combining Participants

Tags: #<Tag:0x00007efebf65cc40> #<Tag:0x00007efebf65ca88> #<Tag:0x00007efebf65c6f0>

Hello, I am pretty new to R, and am teaching it to myself as a psychology and social work graduate student. First questions, I want to create a variable that combines 4 different variables based on their criteria. So, I want to build an Eating Disorder Diagnosis category (EDD) based on a participant indicating a coded score of 1, 3, 5, or 6 for formal diagnosis (FD) OR indicating a year for diagnosis OR indicating a month for diagnosis. Basically I want to create the category of EDD from if people said their doctor diagnosed them, or if they skipped that, but indicated either a month or a year of diagnosis. I do not, however, want to duplicate participants. I just want to have a total frequency of all of these types of people.

Can anyone help? Thank you!