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

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Sun Apr 20 23:08:35 CEST 2008

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.


More information about the R-help mailing list