시작하기무료로 시작하기

결측 탐색을 위한 패싯 활용(다중 플롯)

geom_miss_point()로 결측을 탐색할 때, 여러 개의 그래프를 만들어 비교하는 방법도 유용해요.

앞선 연습에서처럼 nabular 데이터를 활용해 추가적인 패싯 그래프를 만들 수 있어요.

또한 데이터의 값(예: year)과 데이터의 특성(예: 결측 여부)에 따라 다중 패싯 그래프를 만들 수도 있어요.

이 연습은 강의의 일부입니다

R에서 결측치 다루기

강의 보기

연습 안내

  • geom_miss_point()facet_wrap()을 사용해 humidity의 결측 여부에 따라 wind_ewair_temp_c의 결측 패턴이 어떻게 다른지 살펴보세요.
  • geom_miss_point()facet_grid()를 사용해 humidity의 결측 여부와 year별로 wind_ewair_temp_c의 결측 패턴이 어떻게 다른지 살펴보세요.

실습형 인터랙티브 연습

이 예제를 이 샘플 코드를 완성하여 풀어보세요.

# Use geom_miss_point() and facet_wrap to explore how the missingness  
# in wind_ew and air_temp_c is different for missingness of humidity
bind_shadow(oceanbuoys) %>%
  ggplot(aes(x = ___,
           y = ___)) + 
  geom_miss_point() + 
  facet_wrap(~___)

# Use geom_miss_point() and facet_grid to explore how the missingness in wind_ew and air_temp_c 
# is different for missingness of humidity AND by year - by using `facet_grid(humidity_NA ~ year)`
bind_shadow(oceanbuoys) %>%
  ggplot(aes(x = ___,
             y = ___)) + 
  geom_miss_point() + 
  facet_grid(humidity_NA~year)
코드 편집 및 실행