title: Create a binary matrix under certain conditions
body: <p>I am trying to create a function that given <code>m</code> and <code>p</code> returns a matrix with <code>m</code> rows and <code>mxp</code> columns. The matrix should have <code>0</code>'s except for <code>p</code> positions, starting at <code>p</code> (number of row).</p>
  
  <p>For example, given <code>m=4</code> and <code>p=2</code>, the matrix should look like:</p>
  
  <pre><code>1    1    0    0    0    0    0    0
  0    0    1    1    0    0    0    0
  0    0    0    0    1    1    0    0
  0    0    0    0    0    0    1    1
  </code></pre>
  
  <p>I want to work with big matrices.
  I know how to do this with loops in other programming languages such as python, but I am sure that it should be an easier and more elegant way to do this in R. I have been playing for a while with <code>diag()</code> without finding the solution.</p>