I would like to merge two data frames with different columns while columns of the same variable should be added.
This is an example of what I have (the real data frames have about 200 columns each):
A: document v1 v2 v3
1  text1    1  0  0
2  text2    0  0  1
3  text3    0  0  0
B: document v2 v3 v4
1  text1    2  0  1
2  text2    0  1  0
3  text3    1  1  0
What I like to get is:
C: document v1 v2 v3 v4
1  text1    1  2  0  1
2  text2    0  0  2  0
3  text3    0  1  1  0
I tried some variants of merge, bind and join but I can't quite figure it out. Any help would be very welcome!
 
    