Hi!
I have two data sets which I need to merge.
1) demographic data (=one ID per row)
2) Up to 5 duplicates of each ID with different entries per row.
Now I can't just delete the duplicates in order to merge the sets as each entry in (2) is important. Also,the data is quite larger (above 1mill entries), so I guess a loop of some sort would be helfpful. The loop should create a duplicate of each ID in (1) and match the number of duplicates in (2).
data set 1
ID Age
5 34
6 34
data set 2
ID entry1
5 7
5 8
6 8
6 9
6 10
6 11
New data set
ID Age Entry 1
5 34 7
5 34 8
6 34 8
6 34 9
6 34 10
6 34 11
Does this make sense?
Any help would be really appreciated....
Best,
laufegge
I have two data sets which I need to merge.
1) demographic data (=one ID per row)
2) Up to 5 duplicates of each ID with different entries per row.
Now I can't just delete the duplicates in order to merge the sets as each entry in (2) is important. Also,the data is quite larger (above 1mill entries), so I guess a loop of some sort would be helfpful. The loop should create a duplicate of each ID in (1) and match the number of duplicates in (2).
data set 1
ID Age
5 34
6 34
data set 2
ID entry1
5 7
5 8
6 8
6 9
6 10
6 11
New data set
ID Age Entry 1
5 34 7
5 34 8
6 34 8
6 34 9
6 34 10
6 34 11
Does this make sense?
Any help would be really appreciated....
Best,
laufegge