title: Generate integer random numbers from range (0:10^12)
body: <p>I want to generate 10000 integer random numbers between 0 and 10^12.
  Usually, the code would look like this:</p>
  
  <pre><code>x &lt;- sample(0:1000000000000,10000,replace=T)
  </code></pre>
  
  <p>But I get following error message:</p>
  
  <pre><code>Error in 0:1000000000000 : result would be too long a vector
  </code></pre>
  
  <p>Is there a more memory efficient method that doesn't have to put 10^12 integers in a vector just to get a sample of size 10000? 
  If not, is there a way to increase the max size of the vector? I'm working on a 64bit OS with 12GB of free RAM.  </p>