I am doing a research on the influence of extreme weather events on migration. I am now building my dataset which looks like this:
I need to create a new dataset which would give me the number of occurrences, total deaths and total affected for a period of 5 years (which would be the sum of the events that occurred during this period). In other words, I would like to create a table that would look like this: desired dataset:
I could do that by hand with excel, but the number of data is too important (the number of countries/ regions included is more than 200). Therefore, I need to use R. Do you have an idea of how I could proceed?