1

I am dealing with large csv files but actually I only need a small part of it. What I do now is something like this:

df <- read.table('large.csv')
df <- df[df$ID == 100, ]

This is very inefficient in terms of time and memory. Is there a way to only read in the lines with ID ==100 in the first place?

Thanks!

user3768495
  • 4,077
  • 7
  • 32
  • 58
  • This very similar question may be helpful to you: [How do i read only lines that fulfil a condition from a csv into R?](http://stackoverflow.com/questions/23197243/how-do-i-read-only-lines-that-fulfil-a-condition-from-a-csv-into-r) – Jota Apr 24 '15 at 00:42

0 Answers0