I am aware that one can merge (join) two data.table
with 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.
To join two data frames (datasets) vertically, use the rbind function. The two data frames must have the same variables, but they do not have to be in the same order. If data frameA has variables that data frameB does not, then either: Delete the extra variables in data frameA or.
You can merge (combine) rows from one table into another simply by pasting the data in the first empty cells below the target table. The table will increase in size to include the new rows.
Not sure, but maybe (untested) :
Reduce(merge,list(DT1,DT2,DT3,...))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With