-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
It seems to be a common request to be able to identify the matched observation or the source, is flag a good name ?
flag would be a character vector of length 1 to 3 containing either :
- length 1 : The name of a boolean column that would be
TRUEfor matched observation - length 2 : The names of columns containing
TRUEwhen the observation was matched respectively in.xor.y - length 3 : The latter + the former
flag would be NULL by default
Implementation wise we mutate some columns on each side, named as the first 2 elements of flag, or unique temp names from the unique flag element, then join, fill with FALSE, and combine accordingly.
Common use case would probably be :
left_join(x, y, flag ="matched")
left_join(
x,
y |> select_keys_and(),
flag ="matched"
)
In the latter case select_keys_and() is a bit awkwar, it is worth having select_keys() which would do the same but be more limited in scope and look better ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels