title: R : Any other solution to "cannot allocate vector size n mb" in R?
body: <p>My problem resides in simple calculations over big data sets (around 25 millions rows and 10 columns, i.e. aroung 1GB data). 
  My system is:</p>
  
  <pre><code>32bits/Windows7/4Gb Ram/R Studio 0.96, R 2.15.2
  </code></pre>
  
  <p>I can refer my database using BigMemory package. And use functions over my db. Also i am able to do it with ff package, filehash, etc.</p>
  
  <p>The problem is while computing simple calculations (as unique values, means, etc.) i have the typical problem of </p>
  
  <blockquote>
    <p>"cannot allocate vector size n mb"</p>
  </blockquote>
  
  <p>, where n can be as small as 70mb - 95 mb, etc. </p>
  
  <p>I know about all (i think) the solutions provided until now about this:</p>
  
  <pre><code>increase RAM.
  launch R with inline code "--max-mem-size XXXX",  
  use memory.limit() and memory-size() commands, 
  use rm() and gc(), 
  work on 64bit, 
  close other programs, free memory, reboot, 
  use packages bigmemory, ff, filehash, sql, etc etc.
  improve your data, use integers, shorts, etc. ...  
  check memory usage of intermediate calculations, ... 
  etc. 
  </code></pre>
  
  <p>All of this is tested,  done,(except moving to another system/machine, obiously) etc. </p>
  
  <p>But I still get those "cannot allocate vector size n mb", where n is around 90mb for example, with really almost no memory usage from R or other programs, all of it rebooted, fresh.... I am aware of the difference between free memory and allocation from windows and R, etc, but, </p>
  
  <p>It make no sense, because the memory avaiable is more than 3GB.
  I suspect the cause is something really under windows32b -- R memory managment, but it seems almost a joke to buy 4GB of RAM or switch all the system to 64bits, to allocate 70mb. </p>
  
  <p>Is there something I am missing?</p>