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
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
___