Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int time str78 geo str6 value str3 countrycode 2000 "Baden-Württemberg" "26,300" "." 2000 "Stuttgart" "29,500" "." 2000 "Rheinland-Pfalz" "20,600" "." 2000 "Koblenz" "19,500" "." 2000 "Trier" "17,700" "." 2000 "Rheinhessen-Pfalz" "22,200" "." 2000 "Saarland" "21,100" "." 2000 "Sachsen" "15,100" "." end
I would like to input the country code for each region without having to manually select each region as such:
Code:
replace countrycode="LUX" if geo=="Luxembourg"
Code:
replace countrycode="GR" if inlist(geo,Anatoliki Makedonia Thraki,Kentriki Makedonia,Dytiki Makedonia,Ipeiros,Thessalia,Ionia Nisia,Dytiki Ellada,Sterea Ellada,Peloponnisos,Attiki,Voreio Aigaio,Notio Aigaio,Kriti)
0 Response to Replace variable if command
Post a Comment