Get startedGet started for free

Filtering for conditions

You use the filter() verb to get only observations that match a particular condition, or match multiple conditions.

This exercise is part of the course

Data Manipulation with dplyr

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

counties_selected <- counties %>%
  select(state, county, population)

counties_selected %>%
  # Filter for counties with a population above 1000000
  ___
Edit and Run Code