title: R Trying to use for() to fill a matrix
body: <p>Trouble in R</p>
  
  <p>I'm having trouble filling a matrix with values using a for() loop.
  I'm starting with making a blank matrix 1-100</p>
  
  <pre><code>z &lt;- matrix(NA, ncol=100, nrow=100)
  q &lt;- 1:100
  </code></pre>
  
  <p>I need to fill each nrows with 1-100 
  so that the original matrix becomes the sequence 1-100 in every row</p>
  
  <p>i tried</p>
  
  <pre><code>for(n in 1:nrows(z)){
      print(q)
  }
  </code></pre>
  
  <p>but it didn't work as expected. </p>