依州與區域進行摘要
你可以同時依多個欄位分組,而不是只用一個欄位。在這裡,你會練習依州(state)與區域(region)彙總,並體會在連續做多次彙總時有多好用。
counties_selected <- counties %>%
select(region, state, county, population)
本練習屬於課程
使用 dplyr 進行資料操作
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
counties_selected %>%
# Group and summarize to find the total population
___