title: R :: How to generate cases in a table that can occurr different times and with different names?
body: <p>I am trying to automatize an analysis of deltaCT for qPCR in my lab, basically I need to process a dataframe made like this</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>gene_id</th>
  <th>target_id</th>
  <th>Cq</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>TATAB</td>
  <td>EtOH</td>
  <td>26.03</td>
  </tr>
  <tr>
  <td>ROLG</td>
  <td>EtOH</td>
  <td>26.12</td>
  </tr>
  <tr>
  <td>TATAB</td>
  <td>aLA</td>
  <td>21.4</td>
  </tr>
  <tr>
  <td>ROLG</td>
  <td>aLA</td>
  <td>21.9</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>What I want is that everytime i import this table, my code can make multiple sub_matrixes for each gene_id and for each target_id</p>
  <p>EtOH</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>gene_id</th>
  <th>target_id</th>
  <th>Cq</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>TATAB</td>
  <td>EtOH</td>
  <td>26.03</td>
  </tr>
  <tr>
  <td>ROLG</td>
  <td>EtOH</td>
  <td>26.12</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>aLA</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>gene_id</th>
  <th>target_id</th>
  <th>Cq</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>TATAB</td>
  <td>aLA</td>
  <td>21.4</td>
  </tr>
  <tr>
  <td>ROLG</td>
  <td>aLA</td>
  <td>21.9</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>and for each gene_id</p>
  <p>TATAB</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>gene_id</th>
  <th>target_id</th>
  <th>Cq</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>TATAB</td>
  <td>EtOH</td>
  <td>26.03</td>
  </tr>
  <tr>
  <td>TATAB</td>
  <td>aLA</td>
  <td>21.4</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>ROLG</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>gene_id</th>
  <th>target_id</th>
  <th>Cq</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>ROLG</td>
  <td>EtOH</td>
  <td>26.12</td>
  </tr>
  <tr>
  <td>ROLG</td>
  <td>aLA</td>
  <td>21.9</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I can easily do that manually, but i would like to automatize it as in asking R to find all matching rows in &quot;gene_id&quot; column, and create an object with each one of these, that I can use later to work on Cq values.</p>