title: how to read from multiple txt files and remove duplicates, in R
body: <p>I need to read multiple txt files in R to create a unique dataframe.</p>
  <p>Example:
  df1 (sample1)</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">row.names</th>
  <th style="text-align: center;">count</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">name1</td>
  <td style="text-align: center;">1</td>
  </tr>
  <tr>
  <td style="text-align: center;">name2</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td style="text-align: center;">name3</td>
  <td style="text-align: center;">1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>df2 (sample2)</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">row.names</th>
  <th style="text-align: center;">count</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">name1</td>
  <td style="text-align: center;">1</td>
  </tr>
  <tr>
  <td style="text-align: center;">name2</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td style="text-align: center;">name4</td>
  <td style="text-align: center;">1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I would like to obtain a dataframe that contains all the rownames (without duplicates) and the column &quot;count&quot; from each sample (df1 and df2):</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">row.names</th>
  <th style="text-align: center;">sample1</th>
  <th style="text-align: center;">sample2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">name1</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">1</td>
  </tr>
  <tr>
  <td style="text-align: center;">name2</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td style="text-align: center;">name3</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">0</td>
  </tr>
  <tr>
  <td style="text-align: center;">name4</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I tried multiple approaches to solve this problema but I always got stuck at some point.</p>