為分面圖準備資料集
接下來你要為下一個練習中的分面散佈圖準備資料集,正如影片中所提到的。
為此,資料集只需要包含 1996 與 2006 這兩個年份,因為你的圖表只會有兩個分面。已為你預先載入 ilo_data。
本練習屬於課程
在 Tidyverse 中以資料溝通
練習說明
- 使用
filter(),只保留資料集中 1996 與 2006 兩個年份。 - 在你的
filter()呼叫中使用 OR 運算子。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Filter ilo_data to retain the years 1996 and 2006
ilo_data <- ilo_data %>%
___