Hi Hadley, Hope this is what you are looking for. This approach provides number of lines in a large 'bzip' file using chunks.
testconn <- file("xyzxyz.csv.bz2", open="r") csize <- 10000 nolines <- 0 while((readnlines <- length(readLines(testconn,csize))) >0 ) nolines <- nolines+readnlines close(testconn) nolines Regards, Indian_R_Analyst. On Feb 8, 7:16 pm, Hadley Wickham <had...@rice.edu> wrote: > Hi all, > > Is there afastwayto 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-h...@r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://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.