Could data.table add a new argument, "join", that instead of using the 'deafult' data.table's own joining syntax, uses that of ANSI SQL.
{r}
x[i, j, by, ..., join = 'default']
Where join = c('default', 'left', 'right', 'inner', 'outer').
So that:
Thank you!
I think if we want to add the new argument, merge.data.table is a better place to have this.
There is a plan to support syntax similar to the one proposed in this issue. I think there is an open issue for that.
@arunsrinivasan had some interesting ideas recently about improving join api.
For me, it shall be implemented both in the data.table DT[X] Join Syntax, and in merge.data.table.
As DT[X] allows non-equi joins.
As pointed out before, the objective of this is to transform Y[X, join = "left"] to X[Y] :)
I vote for this too. Switching the X and Y position to perform left join changes the entire order of columns.
Most helpful comment
For me, it shall be implemented both in the data.table DT[X] Join Syntax, and in merge.data.table.
As DT[X] allows non-equi joins.
As pointed out before, the objective of this is to transform Y[X, join = "left"] to X[Y] :)