![]() |
From | Richard Goldstein <richgold@ix.netcom.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: importing changes variable to numeric but want string variable |
Date | Fri, 08 Feb 2008 14:33:50 -0500 |
I have a text file with data that looks like this:
us_id firm_name
000007 x
012231 y
100210 z
345211 w
I imported the txt file. When I do this I get data that looks like this:
us_id firm_name
7 x
12231 y
100210 z
345211 w
As you can see the zeros at the beginning of the first two observations of us_id are dropped. How do I prevent this from happening because I need it in the format of the original txt file. I need it to be a string variable and not numeric.
Any ideas? Thanks in advance,
Marilyn.
* * 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–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |