Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: Converting country names into numbers


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Converting country names into numbers
Date   Fri, 5 Feb 2010 11:50:30 +0100

<> 



*************
clear*
inp str10 country
Germany
USA
GB
France
Spain
end

encode country, generate(coun)
sort countr
l, nol
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von DE SOUZA Eric
Gesendet: Freitag, 5. Februar 2010 11:47
An: Statalist
Betreff: st: Converting country names into numbers

I can't for the life of me remember how to convert a variable containg
country names into a variable containing numbers, one for each country.

Eric

Eric de Souza
College of Europe
BE-8000 Brugge (Bruges)
Belgium



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index