title: R: reshape/cast memory error
body: <p>I have a large table (x) to covert to matrix (y).</p>
  
  <p>I used two different commands.</p>
  
  <pre><code>x &lt;- reshape(y, direction="wide", v.names="column1", 
               timevar="column2", idvar="column3")
  </code></pre>
  
  <p>or</p>
  
  <pre><code>x &lt;- cast(x, column1~column2)
  </code></pre>
  
  <p>After waiting for several hours, an error message appears.</p>
  
  <pre><code> Error: cannot allocate vector of size 87 KB
  </code></pre>
  
  <p>In addition: There were 50 or more warnings (use warning() to see the first 50)</p>
  
  <p>when I type <code>warnings()</code>, I found it is complainting </p>
  
  <pre><code>Reached total allocation of 1535 Mb:
  see help(memory.size)
  </code></pre>
  
  <p>In a second trial, I type "<code>memory.size(TRUE)</code> first, a message comes up:  </p>
  
  <pre><code>[1] 12.88
  </code></pre>
  
  <p>Then, I do the analysis all over again.  However, the same error message appears.</p>
  
  <p>I am using a desktop PC with windows 2000.  I am using R2.12.0</p>
  
  <p>Could you mind to let me know if it is possible to get rid of this problem?</p>
  
  <p>Could you mind to let me know when I firstly type <code>memory.size(TRUE)</code> "12.88" comes up, does it mean that it all the 12G physical are RAM readily used by R in the second trial?</p>