On January 21th at 14:15 UTC , progression through exercises will be unavailable for 10 minutes due to a planned maintenance break.
Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Filtering by row
5. The %in% operator
Extracting data by column
Practice using filter() and select()
The pipe operator
Sorting rows


Well done! But we can take a shortcut: we can use the %in% operator instead of spelling out country_name=='Canada' and country_name=='Italy'. The %in% operator looks for a value in a given vector. So we'd write:

filter(countries, country_name %in% c("Canada", "Italy"))


Select data about Spain and Zimbabwe using %in%.

Stuck? Here's a hint!


filter(countries, country_name %in% c("Spain", "Zimbabwe"))