[R] Fast way to determine number of lines in a file

Romain Francois romain.francois at dbmail.com
Mon Feb 8 15:33:20 CET 2010


Hi,

parser::nlines does it in C.

Romain

On 02/08/2010 03:16 PM, Hadley Wickham 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

-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/MPYc : RProtoBuf: protocol buffers for R
|- http://tr.im/KfKn : Rcpp 0.7.2
`- http://tr.im/JOlc : External pointers with Rcpp



More information about the R-help mailing list