title: implementation of simple database search in R
body: <p>I have big data set like as flowing and I want to do simple search on this :</p>
  
  <pre><code>&gt;mydata
  
      ID              TF
  
      hsa-let-7a-1    SRF
      hsa-let-7a-1    PPARG
      hsa-let-7a-2    AREB6
      hsa-let-7a-3    1-Oct
      hsa-let-7a-3    SRF
      hsa-let-7a-3    PPARG
      hsa-let-7b      SRF
      .               .
      .               .
      .               .
  </code></pre>
  
  <p><strong>Question</strong>: For a given <code>y&lt;- c("hsa-let-7a-3","hsa-let-7a-1","hsa-let-7b"...)</code>, find  elements of <code>y</code> which have same TF in <code>mydata</code>. some elements of <code>y</code> might not be in <code>ID</code>, so the checking should be for those elements of y which are in <code>ID</code>!.</p>
  
  <p>Finally print them like cluster or group, where in each group/cluster IDs have identical <code>TF</code>.
  the problem is that, in mydata there are identical  IDs with different <code>TF</code>. 
  can anybody help me to implement this in R.? 
  the output I expect from about example is(all ID in output are in <code>y</code>, but not all elements of <code>y</code> are in <code>ID</code> !) :  </p>
  
  <pre><code>            ID                TF
  
  &gt;group1       hsa-let-7a-1      SRF
                hsa-let-7a-3      SRF
                hsa-let-7b        SRF
  
  &gt;group2       hsa-let-7a-1      PPARG
                hsa-let-7a-3      PPARG
  </code></pre>