I'm positive that this is an incredibly easy answer but I can't seem to get my head around aggregating or casting with Multiple conditions
I have a table that looks like this:
> head(df, n=10L)
STATE EVTYPE FATALITIES INJURIES
1 AL TORNADO 0 15
3 AL TORNADO 0 2
4 AL TORNADO 0 2
5 AL TORNADO 0 2
6 AL TORNADO 0 6
7 AL TORNADO 0 1
9 AL TORNADO 1 14
11 AL TORNADO 0 3
12 AL TORNADO 0 3
13 AL TORNADO 1 26
Obviously this goes on... What I want to do is to collapse by STATE and EVTYPE Summing Fatalities and Injuries as I go so if these 10 rows were my ful dataset the result would be a single row data frame of:
STATE EVTYPE FATALITIES INJURIES
1 AL TORNADO 2 74
My Complete frame has many States and many EVTYPES