Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction to data frames
Data frame structure
Accessing columns in a data frame
Accessing rows of a data frame
Accessing rows and columns combined in a data frame
Data frame analysis
Summary

Instruction

We can use other comparison operators in row filtering.

We'll display only those city rows for which the population is greater than two million. The expression for performing this task looks like this:

cities[cities$population > 2000000, ]

Exercise

Versico would like to determine which countries are most crowded. Display only those rows from the countries data frame for which the population density is greater than 1000. The pop_density column contains information about population density.

Stuck? Here's a hint!

The condition is countries$pop_density > 1000. Place that condition inside [...], followed by a comma.