title: delete parts of a matrix in R
body: <p><em>I changed my question to make my problem more visible:</em></p>
  
  <p>Hello,
  i could not figure out how to delete parts of a matrix in R:</p>
  
  <p>For example</p>
  
  <pre><code>x &lt;- matrix(c(1,2,3,4,5,6,7,8,9), nrow = 3)
  </code></pre>
  
  <p>Now I would like to delete the submatrix <code>x[2,1:2]</code>, so that the final matrix is (comparable to "delete cells and move upwards" in excel) something like</p>
  
  <pre><code>1  4  7
  3  6  8
  NA NA 9.
  </code></pre>
  
  <p>Thanks for you help!</p>