Statalist


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

st: RE: AW: dropping digits from variables in Stata 10


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: AW: dropping digits from variables in Stata 10
Date   Mon, 23 Feb 2009 11:15:29 -0000

But re-formatting alone will not make extraction of the first three
digits any easier. 

Nick 
[email protected] 

Martin Weiss

See http://www.stata.com/support/faqs/data/leading0.html

Ekaterina Hertog

1) I have got a variable consisting of 7 digit zipcodes. I want to 
create a second variable which will only  consist of the first 3 digits 
of each zip-code and I cannot find a way to do it.
2) Some of the zipcodes start with 00, e.g 0037845 and Stata drops the 
front 00 turning such zipcodes into 5-digit numbers (e.g. 37845). I need

to make Stata understand that these 00 are meaningful and return them 
back into the zipcodes and I cannot find how to do this. They were 
present in my original csv file, but when I converted it into a Stata 
file using Stattransfer they were gone.

*
*   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