I have a data frame along the lines of this:
> DF <- data.frame(V1=c("Yes", "Yes", "No"), V2=c("Yes", "No", "No"), V3=c("Yes", "Yes", "No"))
V1 V2 V3
1 Yes Yes Yes
2 Yes No Yes
3 No No No
No I would like to use something along the line of mutate to count the instances of "Yes" in each row to get something like this:
V1 V2 V3 CountYes
1 Yes Yes Yes 3
2 Yes No Yes 2
3 No No No 0
Is there an easy way to do it? I am sadly out of ideas.
Thanks and BW, Jan