title: Group multiple rows in R
body: <p>I have an excel spread sheet with companies names and data regarding sales. Some companies are related and I want to group them together under the same row. I want each column in this row to have the sum of all related companies.</p>
  <p>I'm using R, and would appreciate if someone can give me a direction on how to
  start.</p>
  <p><strong>Edit</strong>- Example of the data:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Company name</th>
  <th>Jan sales</th>
  <th>Jan expenses</th>
  <th>Jan revenue</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Company A</td>
  <td>1000</td>
  <td>500</td>
  <td>500</td>
  </tr>
  <tr>
  <td>Company B</td>
  <td>2000</td>
  <td>500</td>
  <td>1500</td>
  </tr>
  <tr>
  <td>Company C</td>
  <td>3000</td>
  <td>400</td>
  <td>2600</td>
  </tr>
  <tr>
  <td>Company D</td>
  <td>4000</td>
  <td>100</td>
  <td>3900</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to group all this companies under a single row by the name <strong>Company A</strong>.</p>
  <p>I want it to look like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Company name</th>
  <th>Jan sales</th>
  <th>Jan expenses</th>
  <th>Jan revenue</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Company A</td>
  <td>10000</td>
  <td>1500</td>
  <td>8500</td>
  </tr>
  </tbody>
  </table>
  </div>