Summarizing
The summarize()
verb is very useful for collapsing a large dataset into a single observation.
counties_selected <- counties %>%
select(county, population, income, unemployment)
This exercise is part of the course
Data Manipulation with dplyr
Exercise instructions
- Summarize the counties dataset to find the following columns:
min_population
(with the smallest population),max_unemployment
(with the maximum unemployment), andaverage_income
(with the mean of the income variable).
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
counties_selected %>%
# Summarize to find minimum population, maximum unemployment, and average income
___