Alex Alex - 2 months ago 18
R Question

merging multiple data.table

I am aware that one can merge two

data.table
vie the
merge
function or the
[.data.table
function. However, if I have say 10,
data.table
s and want to use
do.call
to merge them all together, is there a function that would do this? Currently I resort to
do.call(cbind, ...)
which works for only very special cases.

Answer

Not sure, but maybe (untested) :

Reduce(merge,list(DT1,DT2,DT3,...))
Comments