I realize that dplyr
v3.0 allows you to join on different variables:
left_join(x, y, by = c("a" = "b")
will match x.a
to y.b
However, is it possible to join on a combination of variables or do I have to add a composite key beforehand?
Something like this:
left_join(x, y, by = c("a c" = "b d")
to match the concatenation of [x.a
and x.c
] to [y.b
and y.d
]
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…