Hi everyone, I am currently analysing a dataset which provides me the data as follow:
Where the first obs are the countries, the second are the sectors and the thirds are certain values associated.
Although I reported just 3 countries and 3 sectors my data spans up to 50 countries and 50 sectors.
My goal would be to concatenate the first two lines of obs generating a new obs right underneath the past two.
Such as:
Obs 3: AUScoal AUSplant AUS glass CHNcoal CHNplants .....etc for all the 50 countries and sectors.
I did find some solution but just for a limited amount of variables.
Thank you very much,
Riccardo
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str4 var1 str6 var2 str5 var3 str4 var4 str6 var5 str5(var6 var7) str6 var8 str5 var9 "AUS" "AUS" "AUS" "CHN" "CHN" "CHN" "POL" "POL" "POL" "coal" "plants" "glass" "coal" "plants" "glass" "coal " "plants" "glass" "1" "2" "3" "4" "5" "6" "4" "7" "7" end
Although I reported just 3 countries and 3 sectors my data spans up to 50 countries and 50 sectors.
My goal would be to concatenate the first two lines of obs generating a new obs right underneath the past two.
Such as:
Obs 3: AUScoal AUSplant AUS glass CHNcoal CHNplants .....etc for all the 50 countries and sectors.
I did find some solution but just for a limited amount of variables.
Thank you very much,
Riccardo
Comment