I have a data.frame (or a matrix or any other tabular data structure object for that matter):
df = data.frame(field1 = c(1,1,1),field2 = c(2,2,2),field3 = c(
I think you want cbind
cbind(dt, df[, 1:2]) # fieldX field1 field2 # 1 x 1 2 # 2 x 1 2 # 3 x 1 2