Dear Stata Users,
I am having the following dataset, which I want to create duplicates for different IDs separated by a comma:
I want to make it look like this:
I am currently using this command, which not exactly what I want:
Can you please help me with code?
Many thanks,
Panos
I am having the following dataset, which I want to create duplicates for different IDs separated by a comma:
ID | Director Name | Gender | Year of Birth |
US1535271068, US1535272058 | David | M | 1980 |
US2003401070 | Alfred | M | 1970 |
US57383M1080, US57383M2070, US57383T1034 | Adam | M | 1960 |
US2003401070 | Helen | F | 1975 |
ID | Director Name | Gender | Year of Birth |
US1535271068 | David | M | 1980 |
US1535272058 | David | M | 1980 |
US2003401070 | Alfred | M | 1970 |
US57383M1080 | Adam | M | 1960 |
US57383M2070 | Adam | M | 1960 |
US57383T1034 | Adam | M | 1960 |
US2003401070 | Helen | F | 1975 |
Code:
split ID, parse(,) generate(newID)
Many thanks,
Panos
Comment