Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: simple string to number data conversion


From   Richard Goldstein <[email protected]>
To   [email protected]
Subject   Re: st: simple string to number data conversion
Date   Wed, 18 Apr 2007 08:10:24 -0400

try the -encode- command

Rich

Donald Braman wrote:

Hi folks,

I have a variable that happens to be a string FIPS abbreviation and
would like to convert it into a numerical FIPS code (e.g., "AL" into
1).

I'm new to STATA, and all my attempts using recode, egen, destring,
etc. have failed. I'm sure it's easy, just can't seem to figure it
out.

Help?

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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