If you are willing to use an external program parse the result of: > system("wc -l small.dat") 10 small.dat
On Windows there is a wc.exe program in the Rtools distribution. On Mon, Feb 8, 2010 at 9:16 AM, Hadley Wickham <had...@rice.edu> wrote: > Hi all, > > Is there a fast way to determine the number of lines in a file? I'm > looking for something like count.lines analogous to count.fields. > > Hadley > > -- > http://had.co.nz/ > > ______________________________________________ > R-help@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. > ______________________________________________ R-help@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.