1. 학습
  2. /
  3. 강의
  4. /
  5. Data Manipulation with dplyr

Connected

연습 문제

Counting citizens by state

You can weigh your count by particular variables rather than finding the number of counties. In this case, you'll find the number of citizens in each state.

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

지침

100 XP
  • Count the number of counties in each state, weighted based on the citizens column, and sorted in descending order.