title: Problems with using subset in r
body: <p>I need to subset my data frame, but I do not know what condition to use.<br></p>
  
  <pre><code>df2&lt;-subset(df, condition )
  
  A part of the dataframe, `df`: 
  state value     
  a 1    
  b 2    
  c 3    
  a 1    
  b 4    
  c 5    
  </code></pre>
  
  <p>I count the sum of the <code>value</code> column for each state using : <code>table(df$state)</code></p>
  
  <p>I need to create a date frame where I show just the rows where the sum of the <code>value</code> column is bigger then a given value x. 
  If x is  3, I need to have in the new data frame just the rows that have the "state" column equal to b or c. </p>
  
  <p>What should I replace "condition" with? How can I use : <code>table(df$state)</code> in the condition?</p>