I have an excel file with multiple rows and columns (13232 rows and 18 columns). The last column gives some value. What I want to do is - find the rows with same column details except the last one and sum their last column value. For example: if input is
+---------+---------+---------+---------+
| Column1 | Column2 | Column3 | Column4 |
+---------+---------+---------+---------+
| ABC | DEF | GHI | 5 |
| XYZ | PQR | LMN | 4 |
| ABC | DEF | GHI | 11 |
| Test1 | Test2 | Test3 | 12 |
| XYZ | PQR | LMN | 54 |
+---------+---------+---------+---------+
then output should be
+---------+---------+---------+---------+
| Column1 | Column2 | Column3 | Column4 |
+---------+---------+---------+---------+
| ABC | DEF | GHI | 16 |
| XYZ | PQR | LMN | 58 |
| Test1 | Test2 | Test3 | 12 |
+---------+---------+---------+---------+
How this can be acheived in R?