I have to confirm which clients ordered in time and paid their products in a dataframe like this:
df<-data.frame(client=c("Lucas","Muriel","Lucas","Muriel","Jack"),
order=c("not received","not received","received","received","received"),
payment=c("received","not received","received","received","received"))
I need to do a list of those clients that completed the two steps that my company demand: to have in the same row "not received" and "received", like Lucas did in the first row.
And to have in a different one "received" and "received", like Lucas did in the third row.
In this case, though Muriel and Jack doesnt have the first step, they are not included into the "good client list". In this case, Lucas would be the only one that completed our procedures .
I was thinking about grouping by client with group_by, and then to check if i have the two rows that i need. I need to have a list of those clients that did complete thee procedures. In tihs case, it would only have a value: "Lucas".
How can I do this?