You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allow.cartesian is a fantastic tool for capturing instances where a many to many join is performed. The condition for being required is when nrow(output) > nrow(x) + nrow(i). When all = T, this is an appropriate condition. When all.x = T or all = F, the condition becomes less reasonable.
In instances where all.x = T, the condition should be nrow(output) > nrow(x) (or whichever one is the first argument)
In instances where all = F, the condition should be nrow(output) > min(nrow(x), nrow(i))
a <- data.table(A = 1:3)
b <- data.table(B = c(1, 1:3))
merge(a, b, by.x = "A", by.y = "B")
The above code should fail due to the duplication created by value '1'.
The text was updated successfully, but these errors were encountered:
@DVDVTAL please let me know if linked issue is not superseding your request here, ideally with example code that is not already handled by solution to the other issue, then we will reopen this one.
allow.cartesian is a fantastic tool for capturing instances where a many to many join is performed. The condition for being required is when nrow(output) > nrow(x) + nrow(i). When all = T, this is an appropriate condition. When
all.x = T
orall = F
, the condition becomes less reasonable.all.x = T
, the condition should be nrow(output) > nrow(x) (or whichever one is the first argument)all = F
, the condition should be nrow(output) > min(nrow(x), nrow(i))The above code should fail due to the duplication created by value '1'.
The text was updated successfully, but these errors were encountered: