I have a 20x2 dataframe. I converted that dataframe to a data.table to perform some operations (deleted the explanation of the operations and goal as out of scope). The conv
Just like setDT() converts its input to a data table by reference, there is also setDF() which converts its input to a data frame by reference. So just call
setDF(df)
and you are back to a data frame with no copies made.