I feel like there should be a simpler way of doing this. Here is my sample data.
df <- tibble( group1 = c(1,1,2,2,3,3,3,3), group2 = c("A&