I have a combination table based on a "colour list":
library(tidyr)
#give available colour combo
colour= c("BK", "CS", "DB","DG","LB","LG","MV","OR","RD","WT","YL","ID","EMPTY")
combo = expand.grid(colour, colour,colour, colour)
#function "colnames" to change column names
colnames(combo) <- c('A','B','C','D')
However I'm not interested in all possible combinations. I want to be able to filter this table by removing the combination that I don't want. For example removing rows that have more than 1 "ID" and rows that have more than 1 "EMPTY". (removing rows like: "ID ID OR LB" or "EMPTY ID LB EMPTY".
I also want to remove rows that have no "ID" at all or no "EMPTY" at all.