Statalist


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

st: insheet numeric variables as strings


From   Xia Jing <[email protected]>
To   <[email protected]>
Subject   st: insheet numeric variables as strings
Date   Wed, 20 May 2009 12:44:32 +0800

Hi, Statalist,
 
 
I am reading a comma delimited file (.txt) to STATA with "insheet", but I'd like to make sure some variables are read in as strings, as I do not want to lose leading zeros in these variables (ICD-9 procedure codes). 
 
Stata currently reads them in as integers.
 
I know I can manually change the first line values of these variables to some artificial characters.  But with large files and large number of variables, this approach becomes quite inconvenient. I'm writing to ask whether there is a better way to do this.
 
Thank you,
 
Alice
 
     
_________________________________________________________________
Windows Live™: Keep your life in sync. Check it out!
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009
*
*   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