依條件篩選
你可以使用 filter() 動詞,只保留符合特定條件,或同時符合多個條件的觀測值。
本練習屬於課程
使用 dplyr 進行資料操作
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
counties_selected <- counties %>%
select(state, county, population)
counties_selected %>%
# Filter for counties with a population above 1000000
___