Skip to content
Prev 323113 / 398502 Next

Merge two dataframe with "by", and problems with the common field

You can also use the 'suffixes. argument to merge to control the naming of the
common column names that are not used as 'by' columns:
  > merge(d1,d2,by="b", suffixes=c("", ".y"))
    b a c d a.y  f
  1 4 1 5 6   1  8
  2 5 2 6 7   2  9
  3 6 3 7 8   3 10

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com