Re: [R] How to read last (incomplete) line from gzfile()?

From: Stephen Eglen <>
Date: Sun, 20 Apr 2008 22:08:35 +0100

Prof Brian Ripley writes:
> I realize I didn't give a solution:
> scan(con, "", sep="\n")

Thanks for this (and for correcting the help page); this works. I also found a workaround using read.table which also allows gzfile connections with an incomplete last line.

Stephen mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sun 20 Apr 2008 - 21:14:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 20 Apr 2008 - 21:30:34 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive