1. Learn
  2. /
  3. Courses
  4. /
  5. Data Manipulation with dplyr

Exercise

Choosing among the four verbs

In this chapter you've learned about the four verbs: select, mutate, transmute, and rename. Here, you'll choose the appropriate verb for each situation. You won't need to change anything inside the parentheses.

Instructions

100 XP
  • Choose the right verb for changing the name of the unemployment column to unemployment_rate
  • Choose the right verb for keeping only the columns state, county, and the ones containing poverty.
  • Calculate a new column called fraction_women with the fraction of the population made up of women, without dropping any columns.
  • Keep only three columns: the state, county, and employed / population, which you'll call employment_rate.