Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
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, !