Tóm tắt dữ liệu
Động từ summarize() rất hữu ích để thu gọn một bộ dữ liệu lớn thành một quan sát duy nhất.
counties_selected <- counties %>%
select(county, population, income, unemployment)
Bài tập này là một phần của khóa học
Xử lý dữ liệu với dplyr
Hướng dẫn bài tập
- Tóm tắt bộ dữ liệu counties để tìm các cột sau:
min_population(dân số nhỏ nhất),max_unemployment(tỷ lệ thất nghiệp lớn nhất), vàaverage_income(giá trị trung bình của biến income).
Bài tập tương tác thực hành trực tiếp
Hãy thử làm bài tập này bằng cách hoàn thành đoạn mã mẫu này.
counties_selected %>%
# Summarize to find minimum population, maximum unemployment, and average income
___