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)
Это упражнение является частью курса
Data Manipulation with dplyr
Инструкции к упражнению
- Use
count()to find the number of counties in each region, using a second argument to sort in descending order.
Интерактивное практическое упражнение
Попробуйте выполнить это упражнение, дополнив этот пример кода.
# Use count to find the number of counties in each region
counties_selected %>%
___