Efficient way to rbind data.frames with different columns
UPDATE: See this updated answer instead. UPDATE (eddi): This has now been implemented in version 1.8.11 as a fill argument to rbind. For example: DT1 = data.table(a = 1:2, b = 1:2) DT2 = data.table(a = 3:4, c = 1:2) rbind(DT1, DT2, fill = TRUE) # a b c #1: 1 1 NA #2: 2 … Read more