I quite like dplyr's set operations for tables, where you can definitely select specific and multiple columns using dplyr::select to narrow down your tables to only those columns you are interested in comparing.
library(dplyr)
a <- tibble(
c1 = 1:10,
c2 = 5:14,
c3 = 11:20
)
b <- tibble(
c1 = 1:5,
c2 = c(5,6,1,1,1),
c3 = c(1,12,1:3)
)
dplyr::intersect(a,b)
#> # A tibble: 1 x 3
#> c1 c2 c3
#> <int> <dbl> <dbl>
#> 1 2 6 12
a %>%
select(c1,c2) %>%
dplyr::intersect(
b %>% select(c1,c2)
)
#> # A tibble: 2 x 2
#> c1 c2
#> <int> <dbl>
#> 1 1 5
#> 2 2 6
Created on 2021-02-24 by the reprex package (v1.0.0)