Statalist


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

st: insheet numeric variables as strings


From   Xia Jing <alice_xj_85@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: insheet numeric variables as strings
Date   Thu, 21 May 2009 08:01:22 +0800

 
Thank you very much.
 
Roy is correct to note that downstream fix would be difficult.
 
 
I found that -infile (free format)- works well. I had thought infile was for fixed format or space delimited only. 
 
For example,  "infile _skip(10) str5 ICD9code  _skip(89) using filename.txt" will forcefully read ICD9code as strings even if it's all numbers.
 
The drawback is that I had to write a very long command with nearly 100 variables of interest.
 
The advantage is that infile was able to read in over 1,000,000 observations quickly.
 
 
Thanks again,
 
Alice
 
 
_________________________________________________________________
Show them the way! Add maps and directions to your party invites. 
http://www.microsoft.com/windows/windowslive/products/events.aspx
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index