Session Ready
Exercise

Ordering vectors

Note that if we want to know which entries of a vector are lower than a particular value we can use code like this:

small <- murders$population < 1000000
murders$state[small]

The code above shows us the states with populations smaller than one million.

Instructions
100 XP
  • Use the results from the previous exercise to report the names of the states with murder rates lower than 1, using the square brackets to retrieve the names of the states from the dataset.