ПочатиПочніть безкоштовно

Mutate, filter, and arrange

In this exercise, you'll put together everything you've learned in this chapter (select(), mutate(), filter() and arrange()), to find the counties with the highest proportion of men.

Ця вправа є частиною курсу

Data Manipulation with dplyr

Переглянути курс

Інструкції до вправи

  • Use a single verb to add a proportion_men column with the fractional male population and also keep the state, county, and population columns.
  • Filter for counties with a population of at least ten thousand (10000).
  • Arrange counties in descending order of their proportion of men.

Інтерактивна практична вправа

Спробуйте виконати цю вправу, доповнивши цей зразок коду.

counties %>%
  # Keep state, county and add proportion_men
  ___
  # Filter for population of at least 10,000
  ___
  # Arrange proportion of men in descending order 
  ___
Редагувати та запускати код