Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
Filtering by row
Extracting data by column
14. Exclude columns by name
Practice using filter() and select()
The pipe operator
Sorting rows


Now we come to one advantage of dplyr over base R: dplyr allows us to exclude columns by name. We simply replace the position number with the column name. So to select all columns except continent, we'd write:

select(countries, -continent)


Select all columns except population from countries.

Stuck? Here's a hint!


select(countries, -population)