title: How to delete specific rows and columns from a matrix in a smarter way?
body: <p>Let's say <code>t1</code> is :</p>
  
  <pre><code>t1 &lt;- array(1:20, dim=c(10,10))
  
        [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
   [1,]    1   11    1   11    1   11    1   11    1    11
   [2,]    2   12    2   12    2   12    2   12    2    12
   [3,]    3   13    3   13    3   13    3   13    3    13
   [4,]    4   14    4   14    4   14    4   14    4    14
   [5,]    5   15    5   15    5   15    5   15    5    15
   [6,]    6   16    6   16    6   16    6   16    6    16
   [7,]    7   17    7   17    7   17    7   17    7    17
   [8,]    8   18    8   18    8   18    8   18    8    18
   [9,]    9   19    9   19    9   19    9   19    9    19
  [10,]   10   20   10   20   10   20   10   20   10    20
  </code></pre>
  
  <p>I want to delete row 4-6 and column 7-9 from this matrix.</p>
  
  <p>I know how to remove it one by one using </p>
  
  <pre><code>t2 &lt;- t1[,-7]
  t3 &lt;- t2[,-8]
  t4 &lt;- t3[,-9]
  t5 &lt;- t4[-4,]
  t6 &lt;- t5[-5,]
  t7 &lt;- t6[-6,]
  </code></pre>
  
  <p>However, I believe it is the most stupid way of doing it.  Could you mind to advice some smarter ways of doing it?</p>