Is there a way to get the number of lines in a file without importing it?
So far this is what I am doing
myfiles <- list.files(pattern=\"*.dat\")
Maybe I am missing something but usually I do it using length on top of ReadLines:
con <- file("some_file.format") length(readLines(con))
This at least has worked with many cases I had. I think it's kinda fast and it does only create a connection to the file without importing it.