title: Set multiple rows of R matrix to same values
body: <pre><code>m &lt;- matrix(ncol=3,nrow=3)
  index &lt;- c(1,3)
  row &lt;- c(F,F,T)
  m[index,] &lt;- row
  </code></pre>
  
  <p>I want to get the matrix</p>
  
  <pre><code>F F T
  NA NA NA
  F F T
  </code></pre>
  
  <p>But instead, the values are being assigned vertically</p>
  
  <pre><code>F T F
  NA NA NA
  F T F
  </code></pre>
  
  <p>I've tried doing transposes and everything that I can think of, but I can't figure out how to set all the rows equal to the <em>row</em> vector without using an ugly for loop.</p>