I wanted to know if there is a function in R that will help me merge two rows. Right now my data is in the following shape
| Car_Type | Prod | Sale | Month |
|---|---|---|---|
| Civic | 120 | 67 | June |
| City | 192 | 112 | June |
If possible, I would like the data to take this shape:
| Car_Type | Prod | Sale | Month |
|---|---|---|---|
| Civic + City | 312 | 179 | June |
I have tried the aggregate function, which works, but it does not manipulate the entire data frame.
Any leads would be appreciated. Thanks!