calsunny 发表于 2015-1-27 12:27 
merge by
see here: http://stackoverflow.com/questions/1299871/how-to-join-data-frames-in-r-inner ...
Thanks a lot,
还是四个实用
Outer join: merge(x = df1, y = df2, by = "CustomerId", all = TRUE)
Left outer: merge(x = df1, y = df2, by = "CustomerId", all.x=TRUE)
Right outer: merge(x = df1, y = df2, by = "CustomerId", all.y=TRUE)
Cross join: merge(x = df1, y = df2, by = NULL)