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

From: Stephen Eglen <S.J.Eglen_at_damtp.cam.ac.uk>
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



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html 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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive