title: Delete entries with only one observation in a group
body: <p>Here I would like to remove entries that have only one-entry for a given city by date. So for instance, I would like to remove the New York and San Francisco entries, since they only have 1 observation on 4-11, and 4-12. </p>
  
  <pre><code>day                          City                  age
  4-10                        Miami                   30
  4-10                        Miami                   23
  4-11                        New York                24
  4-12                        San Francisco           30
  </code></pre>
  
  <p>Note Dataset is called DG</p>
  
  <p>I tried using a for loop to find the days and get an idea of the number of entries per division per day, but I'm not sure how to work with arrays in R.
  countx =0 </p>
  
  <pre><code>D = unique(DG$day)
  for (i in 1:length(D))
  {
      for (j in 1:length(DG$age))
      {
        if (DG$day[j] == D{i]
        {
        countx[j] = 1
        }
        else
        {
        countx[j] = 0
        }
      }
  Binded &lt;- cbind(countx, DG)
  </code></pre>