शुरू करेंमुफ़्त में शुरू करें

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)

यह अभ्यास पाठ्यक्रम का हिस्सा है

Data Manipulation with dplyr

पाठ्यक्रम देखें

अभ्यास निर्देश

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

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Find number of counties per state, weighted by citizens, sorted in descending order
counties_selected %>%
  ___
कोड संपादित करें और चलाएँ