For this exercise we will use the US murders dataset. Make sure you load it prior to starting.

library(dslabs)
data("murders")

Exercise

  1. Compute the per 100,000 (people) murder rate for each state, store the vector in the object murder_rate.

  2. Then compute the average per 100,000 US murder rate using the function mean, store the result in the object mean_murder_rate.