1. Learn
  2. /
  3. Courses
  4. /
  5. Data Science R Basics

Exercise

Match

In this exercise we use the match function to identify the states with abbreviations AK, MI, and IA.

Instructions

100 XP
  • Define a character vector with the abbreviations.
  • Start by defining an index of the entries of murders$abb that match the three abbreviations.
  • Use the [ operator to extract the states.