I have the following data.frame, these are terror events happened in countries and the there can be 200 rows just for one country:
Classes ‘data.table’ and 'data.frame': 80999 obs. of 3 variables:
$ country_txt.factor: Factor w/ 166 levels "Afghanistan",..: 102 102 65 79 131 65 79 150 135 135 ...
$ nkill : num 0 0 1 0 6 0 0 0 0 0 ...
$ nwound : num 7 7 2 1 10 0 0 0 1 0 ...
I would like to create a new data.frame/table where i could make a summary like this:
Country Number of kills(sum) Number of wounds (sum)
Iraq 14000 150000
Afghanistan 10000 8888
.
.
.
Can you help me please how could i do this?