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().
This exercise is part of the course
Data Manipulation with dplyr
Exercise instructions
- Select the columns
state,county, andpovertyfrom thecountiesdataset; in the same step, rename thepovertycolumn topoverty_rate.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
counties %>%
# Select state, county, and poverty as poverty_rate
___