It is clear that there were more Accidental Deaths (115,821) than Murders (389.4) that happened in 1973, per 100,000.

library(datasets)
library(dplyr)

#get sum of all murders in datafame
sum(USArrests$Murder)
## [1] 389.4
#Specify the time series attributes
USAccDeathsDF <- list(month.abb, unique(floor(time(USAccDeaths))))

#make time series into dataframe
USAccDeathsDF <- as.data.frame(t(matrix(USAccDeaths, 12, dimnames = USAccDeathsDF)))

#slice dataframe to only show year 1973
USAccDeaths1973 <- USAccDeathsDF %>%
  slice(1)

#take the sum of new dataframe (Accidental deaths in 1973)
sum(USAccDeaths1973)
## [1] 115821
#Sum of murders in 1973
sum(USArrests$Murder)
## [1] 389.4

There were 314.6 murders in 1973 in states where over 50% of the population lived in urban areas.

#make new dataframe with urban ppulaiton over 50%
USArrests50 <- USArrests%>%
  filter(UrbanPop > 50)

#take sum of murders from new dataframe ofurban population over 50%
sum(USArrests50$Murder)
## [1] 314.6

EXTRA CREDIT

If we wanted to be completely accurate with our results and get sum of each states murders, we would need to find a dataset that had the actual populations of each state in the same year. After that we take the sum of the murders we have for that year. Then divide that number by 5,000,000 (100,000 for each state) and finally multiply that result by the sum of the actual populations for each state. That should give us the real amount of murders that took place in that year.

  1. Using the data of murders from 1973 and the data of actual population of people in 1970 I was able to calculate that there were 15,826.14 murders.
(sum(USArrests$Murder) / 5000000) * 203211926
## [1] 15826.14