2

I'm trying to remove a column from a large data frame by setting it to NULL (x$abc=NULL). Surprisingly, this caused a memory usage spike and I got a typical out-of-memory error message:

Error: cannot allocate vector of size 657.76 Mb In addition: Warning messages: ...

Why is this happening? And how do I avoid it?

Frank
  • 66,179
  • 8
  • 96
  • 180
b_yang
  • 109
  • 6
  • 3
    Consider using data tables. – jlhoward May 20 '14 at 23:59
  • Specifically, take a look at this answer once you have a `data.table` format for your dataset - http://stackoverflow.com/a/19504279/496803 – thelatemail May 21 '14 at 00:53
  • See http://stackoverflow.com/a/13371575/1385941 regarding using `data.table` or at least `data.table::set` on `data.frame` objects – mnel May 21 '14 at 01:17

0 Answers0