Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

give *_join() more control on duplicated and unmatched rows #5661

Closed
mgirlich opened this issue Dec 17, 2020 · 2 comments · Fixed by #5910
Closed

give *_join() more control on duplicated and unmatched rows #5661

mgirlich opened this issue Dec 17, 2020 · 2 comments · Fixed by #5910
Labels
feature a feature request or enhancement tables 🧮 joins and set operations

Comments

@mgirlich
Copy link

mgirlich commented Dec 17, 2020

As @lionel- nicely proposed in #3967 it would be great to have more control on what the *_join() functions do on duplicated or unmatched rows. Proposed arguments:

  • .unmatched = c("keep", "drop", "error")
  • .duplicates = c("error", "product")

for example a 1:1 join would then simply be .unmatched = "error" and .duplicates = "error".

As the arguments should rather be added to the existing *_join() functions the "keep" and "drop" options for .unmatched don't really make sense for all joins. Rather, one would have

left/right/full_join() -> .unmatched = c("keep", "error")
inner_join() -> .unmatched = c("drop", "error")

@mgirlich

This comment has been minimized.

@lionel-

This comment has been minimized.

@hadley hadley mentioned this issue Dec 18, 2020
@hadley hadley added feature a feature request or enhancement tables 🧮 joins and set operations labels Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement tables 🧮 joins and set operations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants