title: Loop with table function in R
body: <p>I am a very beginner with <strong>R</strong>. I have a question about the table function. I have a result like this :</p>
  
  <pre><code>table(my_vector)
  1    2   3
  11  23   7
  </code></pre>
  
  <p>And I want to extract elements from a matrix :</p>
  
  <p>From 1 to 11 as <code>my_matrix[1:11,]</code></p>
  
  <p>Form 11+1 to 11+23 as <code>my_matrix[12:34,]</code></p>
  
  <p>Form 11+23+1 to 11+23+7 as <code>my_matrix[35:41,]</code></p>
  
  <p>How can I do a loop with this ?</p>