Relationships in mutating joins
The relationship
argument in mutating joins allows you to take control over the expected relationship.
From help("mutate-joins")
:
In production code, it is best to preemptively set
relationship
to whatever relationship you expect to exist between the keys ofx
andy
, as this forces an error to occur immediately if the data doesn’t align with your expectations.