title: How to compare 2 inventory lists using R?
body: <p>I have 2 dataframes. One is a more up to date inventory list (Product, Quantity), and one is an older inventory list.</p>
  <p>I am trying to figure out the most efficient way to produce a list of all new product (product that is in the new list but not the old one. This can either be a brand new product, or an addition to the &quot;Quantity&quot; variable with the same Product).</p>
  <p>I am also looking for the opposite - essentially trying to produce a list of all &quot;lost&quot; product (product that is completely removed or quantity goes down)</p>
  <p>I tried doing some anti joins/inner joins with no luck. Anyone have any suggestions on an efficient way to do this in R?</p>
  <p>Datasets:</p>
  <pre><code>n&lt;-6
  new &lt;- data.frame(quantity=1:n, 
                product=rep(LETTERS[1:6], n/6)
  )
  
  n&lt;-4
  old &lt;- data.frame(quantity=1:n, 
                product=rep(LETTERS[1:4], n/4)
  )
  </code></pre>
  <p>here, the result would be 5/E and 6/F as new products, and nothing in the lost products</p>