Dealing With Missing Data in R
Nicholas Tierney
Instructor
ggplot(airquality,
aes(x = Ozone,
y = Solar.R)) +
geom_point()
Warning message:
Removed 42 rows containing
missing values (geom_point).

ggplot(airquality,
aes(x = Ozone,
y = Solar.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 |
ggplot(airquality,
aes(x = Wind,
y = Ozone)) +
geom_miss_point() +
facet_wrap(~ Month)

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

Dealing With Missing Data in R