[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: Skipping Lines When Reading Raw Data
Assuming the 16 lines are imported as 16 additional observations you
can drop them after -infix- like this:
. drop if _n > r(N)-16
--- Alan Neustadtl <email@example.com> wrote:
> I am reading in a large number of raw data files that contain
> 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
> If there are 92 observations the sixteen lines begin on the 100th
> (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.
Yahoo! Mail - PC Magazine Editors' Choice 2005
* For searches and help try: