Counting by region
The counties dataset contains columns for region, state, population, and the number of citizens, which we selected and saved as the counties_selected table. In this exercise, you'll focus on the region column.
counties_selected <- counties %>%
select(county, region, state, population, citizens)
Deze oefening maakt deel uit van de cursus
Data Manipulation with dplyr
Oefeninstructies
- Use
count()to find the number of counties in each region, using a second argument to sort in descending order.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Use count to find the number of counties in each region
counties_selected %>%
___