開始使用免費開始

用分面探索遺漏情形

因為 geom_miss_point() 是 ggplot 的一種 geom,你可以把它和 ggplot2 的功能(例如分面)一起使用。

這代表我們能快速探索遺漏情形,並維持在你熟悉的 ggplot2 工作流程中。

本練習屬於課程

在 R 中處理遺漏值

檢視課程

練習說明

  • 探索風速與氣溫的遺漏情形,並用 geom_miss_point() 顯示這些遺漏。再以年份進行分面以進一步觀察。
  • 探索濕度與氣溫的遺漏情形,並用 geom_miss_point() 顯示這些遺漏。再以年份進行分面以進一步觀察。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Explore the missingness in wind and air temperature, and display the 
# missingness using `geom_miss_point()`. Facet by year to explore this further.
ggplot(___,
       aes(x = ___,
           y = ___)) + 
  ___() + 
  facet_wrap(~year)

# Explore the missingness in humidity and air temperature, and display the 
# missingness using `geom_miss_point()` Facet by year to explore this further.
ggplot(___,
       aes(___,
           ___)) + 
  ____() + 
  facet_wrap(~year)
編輯並執行程式碼