두 변수에 걸친 결측값 시각화

R에서 결측치 다루기

Nicholas Tierney

Instructor

이차원에서 결측 데이터 시각화의 문제

ggplot(airquality,
       aes(x = Ozone,
           y = Solar.R)) + 
  geom_point()
Warning message:
Removed 42 rows containing 
missing values (geom_point).

R에서 결측치 다루기

`geom_miss_point()` 소개

ggplot(airquality,
       aes(x = Ozone,
           y = Solar.R)) + 
  geom_miss_point()

R에서 결측치 다루기

참고: `geom_miss_point()`의 작동 원리

Ozone Ozone_shift Ozone_NA
41 41.00000 !NA
36 36.00000 !NA
12 12.00000 !NA
18 18.00000 !NA
NA -19.72321 NA
28 28.00000 !NA
R에서 결측치 다루기

패싯을 활용한 결측값 탐색

ggplot(airquality,
       aes(x = Wind,
           y = Ozone)) + 
  geom_miss_point() + 
  facet_wrap(~ Month)

R에서 결측치 다루기

패싯을 활용한 결측값 탐색

airquality %>%
  bind_shadow() %>%
ggplot(aes(x = Wind,
           y = Ozone)) + 
  geom_miss_point() + 
  facet_wrap(~ Solar.R_NA)

R에서 결측치 다루기

연습해 봅시다!

R에서 결측치 다루기

Preparing Video For Download...