Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Filtering by row
Extracting data by column
12. Select a range of columns by name
Practice using filter() and select()
The pipe operator
Sorting rows
Summary

Instruction

But with the dplyr package, we can choose ranges of columns another way – by name! Let's select the country_name, continent, and population columns, which are all next to each other. To do that, we'd write:

select(countries, country_name:population)

Exercise

Select the columns from population to water_area by name.

Stuck? Here's a hint!

Type:

select(countries, population:water_area)