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
8. Non-NA subset
Extracting data by column
Practice using filter() and select()
The pipe operator
Sorting rows


Okay, but realistically, we probably want to exclude rows with missing data. The ! operator can do this. We simply add it to the function like this: ! This will return TRUE only if the data is not NA. Suppose we want to see urban population data without any missing values. We'd put:

filter(countries, !


Subset all rows without missing values from the water_area column.

Stuck? Here's a hint!


filter(countries, !