R Lesen eines riesigen CSV

Ich habe eine riesige CSV-Datei. Seine Größe beträgt etwa 9 gb. Ich habe 16 GB RAM. Ich folgte den Ratschlägen desSeit und implementiert sie unten.

If you get the error that R cannot allocate a vector of length x, close out of R and add the following line to the ``Target'' field: 
--max-vsize=500M 

Trotzdem erhalte ich den folgenden Fehler und die folgenden Warnungen. Wie soll ich die Datei mit 9 GB in mein R lesen? Ich habe R 64 Bit 3.3.1 und ich laufe unter Befehl im rstudio 0.99.903. Ich habe Windows Server 2012 R2 Standard, 64-Bit-Betriebssystem.

> memory.limit()
[1] 16383
> answer=read.csv("C:/Users/a-vs/results_20160291.csv")
Error: cannot allocate vector of size 500.0 Mb
In addition: There were 12 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In scan(file = file, what = what, sep = sep, quote = quote,  ... :
  Reached total allocation of 16383Mb: see help(memory.size)
2: In scan(file = file, what = what, sep = sep, quote = quote,  ... :
  Reached total allocation of 16383Mb: see help(memory.size)
3: In scan(file = file, what = what, sep = sep, quote = quote,  ... :
  Reached total allocation of 16383Mb: see help(memory.size)
4: In scan(file = file, what = what, sep = sep, quote = quote,  ... :
  Reached total allocation of 16383Mb: see help(memory.size)
5: In scan(file = file, what = what, sep = sep, quote = quote,  ... :
  Reached total allocation of 16383Mb: see help(memory.size)
6: In scan(file = file, what = what, sep = sep, quote = quote,  ... :
  Reached total allocation of 16383Mb: see help(memory.size)
7: In scan(file = file, what = what, sep = sep, quote = quote,  ... :
  Reached total allocation of 16383Mb: see help(memory.size)
8: In scan(file = file, what = what, sep = sep, quote = quote,  ... :
  Reached total allocation of 16383Mb: see help(memory.size)
9: In scan(file = file, what = what, sep = sep, quote = quote,  ... :
  Reached total allocation of 16383Mb: see help(memory.size)
10: In scan(file = file, what = what, sep = sep, quote = quote,  ... :
  Reached total allocation of 16383Mb: see help(memory.size)
11: In scan(file = file, what = what, sep = sep, quote = quote,  ... :
  Reached total allocation of 16383Mb: see help(memory.size)
12: In scan(file = file, what = what, sep = sep, quote = quote,  ... :
  Reached total allocation of 16383Mb: see help(memory.size)
------------------- Update1

Mein erster Versuch basierend auf der vorgeschlagenen Antwort

> thefile=fread("C:/Users/a-vs/results_20160291.csv", header = T)
Read 44099243 rows and 36 (of 36) columns from 9.399 GB file in 00:13:34
Warning messages:
1: In fread("C:/Users/a-vsingh/results_tendo_20160201_20160215.csv",  :
  Reached total allocation of 16383Mb: see help(memory.size)
2: In fread("C:/Users/a-vsingh/results_tendo_20160201_20160215.csv",  :
  Reached total allocation of 16383Mb: see help(memory.size)
------------------- Update2

Mein 2. Versuch basierend auf der vorgeschlagenen Antwort ist wie folgt

thefile2 <- read.csv.ffdf(file="C:/Users/a-vs/results_20160291.csv", header=TRUE, VERBOSE=TRUE, 
+                    first.rows=-1, next.rows=50000, colClasses=NA)
read.table.ffdf 1..
Error: cannot allocate vector of size 125.0 Mb
In addition: There were 14 warnings (use warnings() to see them)

Wie kann ich diese Datei in ein einzelnes Objekt einlesen, um die gesamten Daten auf einmal zu analysieren?

------------------ Update 3

Wir haben eine teure Maschine gekauft. Es hat 10 Kerne und 256 GB RAM. Das ist nicht die effizienteste Lösung, funktioniert aber zumindest in naher Zukunft. Ich habe mir die folgenden Antworten angesehen und glaube nicht, dass sie mein Problem lösen :( Ich schätze diese Antworten. Ich möchte die Warenkorbanalyse durchführen und glaube nicht, dass es keinen anderen Weg gibt, als meine Daten im RAM zu behalten

Antworten auf die Frage(10)

Ihre Antwort auf die Frage