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

st: Skipping Lines When Reading Raw Data


From   Alan Neustadtl <[email protected]>
To   [email protected]
Subject   st: Skipping Lines When Reading Raw Data
Date   Fri, 30 Sep 2005 09:51:37 -0400

I am reading in a large number of raw data files that contain header
information as well as non-data information at the end of the file.

The first seven lines always contain header info and I can skip over
this using the following code:  "infix 8 firstlineoffile".

When the data end, there are sixteen lines with non-data information. 
If there are 92 observations the sixteen lines begin on the 100th line
(7+92=99=header+data).  If there are 126 observations (7+126=133) the
sixteen lines begin on line 134.

Any ideas about how to either read these data w/o the last sixteen
line or how to drop the observations after reading in all the data?  I
do not know the number of observations beforehand.

TIA,
Alan

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