Hello,
I have two files and I want to add the missing value from file 2 to file 1.
For example, File 1 has ALL IDs but incompleted variable 1 (character variable). File 2 has completed Variable1 and their corresponding IDs.
When ID = 1 or 3, variable1 is incomplete as highlighted in File 2. ID = 2 does not show in File 2, which means when ID = 2, Variable1 is completed. I would like to merge these two files as File 3 shows.
File 1
ID Variable1
1 A10
1 B20
2 G11
2 G12
2 R13
3 E25
3 E38
3 F69
File 2
ID Variable1
1 A10
1 B20
1 C30
3 E25
3 E38
3 F69
3 D87
File 3
ID Variable1
1 A10
1 B20
1 C30
2 G11
2 G12
2 R13
3 E25
3 E38
3 F69
3 D87
what code do I need to use? Thanks.