Key matching conditions: examples

df <- tibble(name = c("John", "Simon", "Tracy", "Max"))
df
## # A tibble: 4 × 1
##   name 
##   <chr>
## 1 John 
## 2 Simon
## 3 Tracy
## 4 Max

Generate permutations in a self-join with cross_join():

df |> cross_join(df)
## # A tibble: 16 × 2
##   name.x name.y
##   <chr>  <chr> 
## 1 John   John  
## 2 John   Simon 
## 3 John   Tracy 
## 4 John   Max   
## # ℹ 12 more rows