title: Removing specific duplicate values from dataframe in R
body: <p>I have a data frame that consists of a lot of ID numbers in one column and a dummy variable in the other column. The data frame has multiple iterations of the same ID, but the dummy values are inconsistent. For example:</p>
  
  <pre><code>   ID dummy
  1  1111     1
  2  1111     1
  3  1111     0
  4  1112     0
  5  1112     0
  6  1112     0
  7  1112     0
  8  1113     1
  9  1113     0
  10 1113     1
  </code></pre>
  
  <p>What I want is to get my own data frame of all these individual ID numbers as well as the dummy value of 1 (if it ever has a single instance of 1, otherwise just 0). What keeps happening is when I try and separate the duplicates, sometimes I am left with the dummy value that is 0 and not 1. Here is an example of what I am trying to get:</p>
  
  <pre><code>   ID dummy
  1  1111     1
  2  1112     0
  3  1113     1
  </code></pre>
  
  <p>Please help.</p>