title: Selecting specific rows based on values in 2 columns in R
body: <p>I have a large data set of GPS collar locations that have a varying number of locations each day. I want to separate out only the days that have a single location collected and make a new data frame containing all their information.</p>
  
  <pre><code>month    day    easting    northing    time    ID
    6       1     #######    ########    0:00    ##
    6       2     #######    ########    6:00    ##
    6       2     #######    ########    0:00    ##
    6       3     #######    ########    18:00   ##
    6       3     #######    ########    12:00   ##
    6       4     #######    ########    0:00    ##
    6       5     #######    ########    6:00    ##
  </code></pre>
  
  <p>Currently I have hashed together something, but can't quite get to the next step.</p>
  
  <pre><code>library(plyr)
  dog&lt;-count(data1,vars=c("MONTH","day"))
  datasub1&lt;-subset(dog,freq==1)
  </code></pre>
  
  <p>This gives me a readout that looks like</p>
  
  <pre><code>    MONTH day freq
  1       6  29    1
  7       7   5    1
  8       7   6    1
  10      7   8    1
  12      7  10    1
  </code></pre>
  
  <p>I am trying to use the values of the Month and day to pull out the rows that contain them from the main dataset so that I can make a data frame containing only the points with a frequency of 1 but that contains all the associated data. I've got to this point:</p>
  
  <pre><code>sis&lt;-c(datasub1$MONTH)
  bro&lt;-c(datasub1$day)
  datasub2&lt;-subset(data1,MONTH==sis&amp;day==bro)
  </code></pre>
  
  <p>... but that doesn't give me anything, personally it makes intuitive sense (R beginner) that it should subset out the rows that contain both the values of bro and sis. </p>
  
  <p>Any help would be greatly appreciated.</p>