I have 1 base file that looks as follows:
ID  x1
1   5
2   20
3   14
4   8
5   20
I have 1.000 seperate files, that each contain extra variables. 2 examples are:
ID  x2
1   45
2   85
3   42
7   52
8   41
ID  x2
10  54
12  4
4   7
5   21
What I would like to get it:
ID  x1  x2
1   5   45
2   20  85
3   14  42
4   8   7
5   20  21
I only want to add matching IDs in "mydata". I initially tried to merge all separate files into 1 single file and then merge, but the size is too large. I also tried merging in loop, but this keeps adding new variables. Any suggestions on how to merge this?
 
     
     
    