Have DT1, DT2; need to "join" them and keep all rows; the result is DT3. How to achieve it?
require(data.table)
DT1 <- data.table(ID_1 = 1:2, val_1 = 1:2)
DT2 <- data.table(ID_2 = 3:4, val_2 = 3:4)
DT1
DT2
DT3 <- data.table(ID_1 = c(1,1,2,2), ID_2 = c(3,4,3,4), val_1 = c(1,1,2,2), val_2 = c(3,4,3,4))
DT3