Hello all,
in my dataset, I have string data related to the iso_code of the regional and it is in terms of the text and number i.e" :AT11, AT12, AU1, ES62, FI19,..... I tried to separate the part of the number from the text.
I did several ways, but they did not separate.
I followed the help of split in the STATA:
also:
I appreciate any help and guidance you can provide.
Many thanks in advance for your valuable time.
best,
Khati
in my dataset, I have string data related to the iso_code of the regional and it is in terms of the text and number i.e" :AT11, AT12, AU1, ES62, FI19,..... I tried to separate the part of the number from the text.
I did several ways, but they did not separate.
Code:
territorylevelandtypology reg_id region year emp_new NUTS2_id Large regions (TL2) AT11 Burgenland 1999 123600 AT11 Large regions (TL2) AT11 Burgenland 2000 124900 AT11 Large regions (TL2) AT11 Burgenland 2001 120400 AT11 Large regions (TL2) AT11 Burgenland 2002 122000 AT11 Large regions (TL2) AT11 Burgenland 2003 124700 AT11 Large regions (TL2) AT11 Burgenland 2004 119200 AT11 Large regions (TL2) AT11 Burgenland 2005 126400 AT11 Large regions (TL2) AT11 Burgenland 2006 128000 AT11 Large regions (TL2) AT11 Burgenland 2007 132400 AT11 Large regions (TL2) AT11 Burgenland 2008 133700 AT11 Large regions (TL2) AT11 Burgenland 2009 133800 AT11 Large regions (TL2) AT11 Burgenland 2010 135100 AT11
Code:
split reg_id, generate(ISO2)
Code:
split reg_id, p(")") foreach v in `r(varlist)' { replace `v' = `v' + ")" }
I appreciate any help and guidance you can provide.
Many thanks in advance for your valuable time.
best,
Khati
Comment