Session Ready
Exercise

sort

When looking at a dataset, we may want to sort the data in an order that makes more sense for analysis. Let's learn to do this using the murders dataset as an example.

Instructions
100 XP
  • Use the $ operator to access the population size data and store it in the object pop.
  • Then use the sort function to redefine pop so that it is sorted.
  • Finally use the [ operator to report the smallest population size.