I want to merge two objects together. I have read multiple times that data.table
is a lot faster than data.frame
or others.
One object is (in reality with 2000ish rows)
date yw ym1 17897 17896 178972 17898 17896 178973 17899 17896 178974 17900 17896 178975 17901 17896 178976 17902 17896 17897
and the other would be the unique observations for every (unique) week (month).
I tried different combinations of functions (merge()
, merge.data.frame()
and merge.data.table()
) with different classes (data.frame
, tibble
and data.table
).
But unlike what I have, read they all operate in the same order of magnitude but merge()
with plain data.frame
is consistently the fastest.
So my question is: can improve on that somehow, or is it only improvable if the dimensions were higher?