title: Generate large matrix filled with 0's or 1's in R
body: <p>In R language, I am trying to generate a large matrix filled with <code>0</code>'s and <code>1</code>'s.</p>
  
  <p>I have generated a large matrix but its filled with values <strong>between</strong> 0 and 1. </p>
  
  <p>Here is how I did that:</p>
  
  <pre><code>NCols=500 
  NRows=700 
  mr&lt;-matrix(runif(NCols*NRows), ncol=NCols) 
  </code></pre>