/I have a data frame as such:
customer_id<-c("aks123","epfk123","jfk1234","ekdm453","ddd4356","epfk123","ffg234","aks123","jfk1234","ekdm453")
customer_type<-c("loyal","good","old","new","new","loyal","good","loyal","good","new")
df<-data.frame(customer_id,customer_type)
I want to filter the data such that I want unique customer_id's only if their respective customer_type are same, if the customer types are different, I want them to be shown as two separate rows.
There are many other columns in the df as well (like name,budget,...), these are just the ones I want to put the filter based on. So using unique function would be an issue.
For example customer_id "jfk1234" is twice but has customer type both "loyal" and "good", so they should be in separate rows but customer_id "aks123" also appearing twice, is just in customer_type "loyal", and so should be only once