I have a file with 15 million lines (will not fit in memory). I also have a small vector of line numbers – the lines that I want to extract.
How can I read-out the lines in one pass?
I was hoping for a C function that does it on one pass.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The trick is to use connection AND open it before
read.table:You may also try
scan, it is faster and gives more control.