title: R: Counting observations of a class
body: <p>I have following dataset:</p>
  
  <pre><code>X v1 v2  class
  1 12 10  A
  2 11 13  B
  3 14 15  A
  </code></pre>
  
  <p>I have two objects of class A and one Object of class B. What I need to do is to take this matrix and delete all classes whose number of observations do not meet a threshold-requirement. If my Threshold-Count = 2, I would like to have following result:</p>
  
  <pre><code>X v1 v2  class
  1 12 10  A
  3 14 15  A
  </code></pre>
  
  <p>How could I achieve this in R?</p>