title: Remove rows conditionally from a data.table in R
body: <p>I have a data.table with fields {id, menuitem, amount}.</p>
  
  <p>This is transaction data - so, ids are unique, but menuitem repeats. Now, I want to remove all entries where <code>menuitem == 'coffee'</code>.</p>
  
  <p>Also, want to delete all rows where <code>amount &lt;= 0</code>;</p>
  
  <p>What is the right way to do this in data.table? </p>
  
  <p>I can use <code>data$menuitem!='coffee'</code> and then index int into data[] - but that is not necessarily efficient and does not take advantage of data.table.</p>
  
  <p>Any pointers in the right direction are appreciated.</p>