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.
I'm using R, and would appreciate if someone can give me a direction on how to start.
Edit- Example of the data:
Company name | Jan sales | Jan expenses | Jan revenue |
---|---|---|---|
Company A | 1000 | 500 | 500 |
Company B | 2000 | 500 | 1500 |
Company C | 3000 | 400 | 2600 |
Company D | 4000 | 100 | 3900 |
I want to group all this companies under a single row by the name Company A.
I want it to look like this:
Company name | Jan sales | Jan expenses | Jan revenue |
---|---|---|---|
Company A | 10000 | 1500 | 8500 |