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

Exercise

Variable names

In the previous question, we saw the different variables that are a part of this dataset from the output of the str() function. The function names() is specifically designed to extract the column names from a data frame.

Instructions

100 XP

For this question, we will use the names() function to extract the column names of the murders data frame.

  • What are the column names used by the murders data frame for the five variables?