I have a huge dataset similar to the one below:
Df <- data.frame("Candidate ID" = c(1042, 1042, 1113, 1113, 1146, 1277, 1381, 1381, 1402, 1402),
"Application ID" = c(1040, 13006, 1111, 1125, 1144, 1274, 41, 61, 64, 65),
"Question" = c("Yes", "Yes", "No","Yes", "Yes","No", "No", "No","Yes", "No"))
Background: Candidates can apply to multiple job requisitions and receive each time a different application id. One candidate id can also apply to up to 25 job requisitions, i.e. apply 25 different times. In my simplified example, the maximum is two.
I would like to extract all candidate ids where the answers to the question are all "yes". In the example, I would like to extract only the candidate ids 1042 and 1146. How can I do this in R?
I checked in StackOverflow and could not find a matching answer, perhaps also to difficulties in describing the problem. At least I made an effort in creating a minimum reproducible example to make it easy to help me.