Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

re: st: How to read in an irregular ASCII-file?


From   Doug Owens <[email protected]>
To   [email protected]
Subject   re: st: How to read in an irregular ASCII-file?
Date   Wed, 12 Jan 2005 11:42:56 -0500

I would likely tackle this problem by reading in the raw dataset with
just one string variable per  line of data. Then I would create some
variables from the lines that begin with "1", the simpler case.  Then
I'd create more variables from the lines beginning with "2". This is a
bit more complicated, and I would probably make use of the index
function.

That done, I would fill down data for consecutive observations that
are really one record, and keep one observation per record.

Sorry I don't have the time to write actual code.
*
*   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