title: Removing negative values and one positive value from R dataframe
body: <p>I have a dataframe where one column is the amount spent.  In the amount spent column there are the values for amount spent and also negative values for any returns. For example.</p>
  
  <pre><code>ID    Store    Spent
  123    A        18.50
  123    A       -18.50
  123    A        18.50
  </code></pre>
  
  <p>I want to remove the negative value then one of its positive counter parts - the idea is to only keep fully completed spend amounts so I can look at total spend.</p>
  
  <p>Right now I am thinking something like this - where I have the data frame sorted by spend</p>
  
  <pre><code>if spend &lt; 0 {
    take absolute value of spend
    if diff between abs(spend) and spend+1 = 0 then both are NA}
  </code></pre>
  
  <p>I would like to have something like</p>
  
  <pre><code>df[df$spend &lt; 0] &lt;- NA
  </code></pre>
  
  <p>where I can also set one positive counterpart to NA as well. Any suggestions?</p>