We can see that event B only has 2 models of data. As the actual data frame I am using has thousands of rows and 17 columns, how can I remove all events that do not have 3 models? My guess is to use a filter however I am not sure how to do it when we have more than one condition.
I tried the code below:
df %>% group_by(Event) %>%
filter(max(Model)==3)
However, this would miss out entries in the data that looked like this.
Be careful, this syntax may not solve the cases in which some duplicated observations exist.
for example, if there're 2 sets of Event = B and Model = 2