id x 1 2 x1 x2 id y 1 2 y1 y2 3 x3 4 y4 inner_join(x, y, by = "id")