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
I think we should avoid the merge function other than as a side note. One of data.table's strengths is its merge syntax, and that is what should be front, right and centre.
In addition, the overlap join functions have a separate syntax, it might be worth placing all syntactically similar joins together to have them all in one place.
I think we should avoid the merge function other than as a side note. One of data.table's strengths is its merge syntax, and that is what should be front, right and centre.
I started the vignette with the merge function as is easier to understand for new users. In my case is normal to use many merge function in chain following the next syntax as is the only way to apply left join.
What I could do is to move the mergelist from point 3 to point 2 to avoid the switch from function to syntax.
In addition, the overlap join functions have a separate syntax, it might be worth placing all syntactically similar joins together to have them all in one place.
I thought that overlap join is an application of non-equi join.
overlapping join (foverlaps api) is a special case of non-equi join ([.data.table api).
I second @avimallu suggestion about dropping merge. Mentioning it and linking manual sounds good, but it is sub-optimal in performance and in features so we should try not to onboard users into it. mergelist is good substitute.
Activity
franknarf1 commentedon May 27, 2017
See #944 . There are many ideas for vignettes there.
If you want some examples, you could see stackoverflow.com or maybe my notes.
arunsrinivasan commentedon Jun 29, 2017
batcheneden commentedon Jul 13, 2017
MichaelChirico commentedon Jul 13, 2017
batcheneden commentedon Jul 16, 2017
jangorecki commentedon Aug 26, 2019
MichaelChirico commentedon Aug 29, 2019
Noting for reference: joins vignette would be a good place to have an example of replacing nested
ifelsewith a join.42 remaining items
tdhock commentedon Nov 28, 2023
I used the flights data to explain joins, in my slides for the data.table tutorial at the LatinR meeting last month, https://github.com/tdhock/2023-10-LatinR-data.table#english
jangorecki commentedon Nov 28, 2023
mergelist PR is ready to merge so probably will land in master before the vignette, so should be included as well
foverlaps is missing
avimallu commentedon Nov 28, 2023
I think we should avoid the merge function other than as a side note. One of
data.table's strengths is its merge syntax, and that is what should be front, right and centre.In addition, the overlap join functions have a separate syntax, it might be worth placing all syntactically similar joins together to have them all in one place.
AngelFelizR commentedon Nov 28, 2023
@avimallu
I started the vignette with the merge function as is easier to understand for new users. In my case is normal to use many merge function in chain following the next syntax as is the only way to apply left join.
What I could do is to move the mergelist from point 3 to point 2 to avoid the switch from function to syntax.
I thought that overlap join is an application of non-equi join.
jangorecki commentedon Nov 28, 2023
overlapping join (
foverlapsapi) is a special case of non-equi join ([.data.tableapi).I second @avimallu suggestion about dropping
merge. Mentioning it and linking manual sounds good, but it is sub-optimal in performance and in features so we should try not to onboard users into it.mergelistis good substitute.AngelFelizR commentedon Nov 28, 2023
Here is the new structure
data.tablesyntax joinsxon joinxbased onimatching columns byxgroups ()i.andx.j's prefixesmergelist)mergeand link to documentation)jangorecki commentedon Nov 28, 2023
nb. mergelist supports full join as well, probably much more efficient than merge
AngelFelizR commentedon Nov 28, 2023
That's sounds really good.
So the will the vignette's structure:
data.tablesyntax joinsxon joinxbased onimatching columns byxgroups ()i.andx.j's prefixesmergelist)Link to
mergefunction documentationjangorecki commentedon Nov 28, 2023
Moreover, mergelist has more mult options as far as I recall.
Aggregate on join is not possible by x's column yet. Only by each I.
Tweaks on datatable-joins.Rmd
tdhock commentedon Nov 15, 2024
fixed by #6478
(textproc/R-data.table) Updated 1.16.4 to 1.18.4, Fix build against 4…