Description Usage Arguments Details Value
View source: R/pipeline-helpers.R
In an ordinary left_join
, if a row in the left operand has
multiple matches in the right operand, you get a copy of the row for each
match in the right operand. Sometimes you want just one arbitrary member of
the matching set. This could be because the right operand is a one-to-many
mapping, and you don't care which one you get (but you want only one), or it
could be that you're trying to reproduce the behavior of legacy code that
uses match
, which has this behavior. This function performs
such a join.
1 | left_join_keep_first_only(x, y, by)
|
x |
Left table to join |
y |
Right table to join |
by |
Vector of id columns. Unlike in other join variants, these must be supplied explicitly. |
This function performs a left join, except that if the right operand has multiple matches for a row in the left operand, only the first match is kept. Use this function with caution. The results will depend on the order of the rows in the right operand, meaning that seemingly innocuous changes can produce changes in output. Consider yourself warned.
Joined table. In case of multiple matches, only the first will be included.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.