Alan,
Assuming the 16 lines are imported as 16 additional observations you
can drop them after -infix- like this:
. count
. drop if _n > r(N)-16
Friedrich Huebler
--- Alan Neustadtl <[email protected]> wrote:
> 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
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
*
* 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/