I have two data frames A and B which look like:
firstDF: col1 col2 id A 1 2 B 5 3 C 6 4 secondDF: col1 col2 id A 1 2 E 15 5 F 16 6 Resultant DF: col1 col2 id A 1 2 B 5 3 C 6 4 E 15 5 F 16 6 The resultant data frame must contain all the rows from the two data frames. Incase there are rows which have the same id, it must be put in the resultant data frame only once.
I tried using the rbind function, but it returns with all the rows merged. I tried using the merge function with condition x.id=y.id, but the resultant data frame created had multiple columns namely x.col1, y.col1,x.col2, y.col2 and so on.