title: Identify subsets containing only repeats of an expression
body: <p>I have a dataset like so: </p>
  
  <pre><code> df&lt;-data.frame(x=c("A","A","A","A", "B","B","B","B","B", 
                     "C","C","C","C","C","D","D","D","D","D"),  
                  y= as.factor(c(rep("Eoissp2",4),rep("Eoissp1",5),"Eoissp1","Eoisp4","Automerissp1","Automerissp2","Acharias",rep("Eoissp2",3),rep("Eoissp1",2))))
  </code></pre>
  
  <p>I want to identify, for each subset of <code>x</code>, the corresponding levels in <code>y</code> that are entirely duplicates containing the expression <code>Eois</code>. Therefore, <code>A</code> , <code>B</code>, and <code>D</code> will be returned in a vector because every level of  <code>A</code> , <code>B</code>, and <code>D</code> contains the expression <code>Eois</code> , while level <code>C</code> consists of various unique levels (e.g. Eois, Automeris and Acharias). For this example the output would be: </p>
  
  <pre><code>   output&lt;- c("A", "B", "D")
  </code></pre>