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

Exercise

Logical Vectors

Here we will be using logical operators to create a logical vector.

Instructions

100 XP
  • Compute the per 100,000 murder rate for each state and store it in an object called murder_rate.
  • Then use the logical operators to create a logical vector, name it low, that tells us which entries of murder_rate are lower than 1, and which are not, in one line of code.