Aan de slagGa gratis aan de slag

Renaming a column as part of a select

rename() isn't the only way you can choose a new name for a column; you can also choose a name as part of a select().

Deze oefening maakt deel uit van de cursus

Data Manipulation with dplyr

Cursus bekijken

Oefeninstructies

  • Select the columns state, county, and poverty from the counties dataset; in the same step, rename the poverty column to poverty_rate.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

counties %>%
  # Select state, county, and poverty as poverty_rate
  ___
Code bewerken en uitvoeren