Counts the number of lines in a text file
Counts the number of lines in a text file by count the number of occurances of platform-independent newlines (CR, LF, and CR+LF ), including a last line with neither. An empty file has zero lines.
## S3 method for class 'default': countLines(file, chunkSize=5e+07, ...)
connectionor a pathname.
- The number of bytes read in each chunk.
- Not used.
- Returns an non-negative
 Page Newline, Wikipedia, July 2008.
pathname <- system.file("NEWS", package="R.utils"); n <- countLines(pathname); n2 <- length(readLines(pathname)); stopifnot(n == n2);