I've a data like this in a text file
fd50c4007b68a3737fe052d5a4f78ce8aa117f3d SOEGIYH12A6D4FC0E3 1
fd50c4007b68a3737fe052d5a4f78ce8aa117f3d SOFLJQZ12A6D4FADA6 1
fd50c4007b68a3737fe052d5a4f78ce8aa117f3d SOHTKMO12AB01843B0 1
fd50c4007b68a3737fe052d5a4f78ce8aa117f3d SODQZCY12A6D4F9D11 1
fd50c4007b68a3737fe052d5a4f78ce8aa117f3d SOXLOQG12AF72A2D55 1
d7083f5e1d50c264277d624340edaaf3dc16095b SOUVUHC12A67020E3B 1
d7083f5e1d50c264277d624340edaaf3dc16095b SOUQERE12A58A75633 1
d7083f5e1d50c264277d624340edaaf3dc16095b SOIPJAX12A8C141A2D 1
d7083f5e1d50c264277d624340edaaf3dc16095b SOEFCDJ12AB0185FA0 2
d7083f5e1d50c264277d624340edaaf3dc16095b SOATCSU12A8C13393A 2
Which I am successfully able to keep in a variable but:
- I need to sort this data with respect to third field.
- I need to sort the data with respect to first field and group it with respect to same 1st field and want to sum t he 3rd field in a group.
Is it possible to do with R language?
The output should be:
fd50c4007b68a3737fe052d5a4f78ce8aa117f3d 5
d7083f5e1d50c264277d624340edaaf3dc16095b 7