산점도로 결측치 탐색하기
ggplot2의 산점도에서는 기본적으로 결측값이 경고와 함께 제거됩니다.
geom_miss_point()를 사용하면 산점도에 결측값을 표시할 수 있습니다. 이 특별한 ggplot2 geom은 결측값을 그래프 안으로 옮겨, 해당 변수의 최솟값보다 10% 아래에 표시해 줍니다.
이 시각화를 oceanbuoys 데이터셋으로 연습해 보세요.
이 연습은 강의의 일부입니다
R에서 결측치 다루기
연습 안내
- 풍속 동서 성분(
wind_ew)과 기온의 결측을 탐색하고,geom_miss_point()로 결측을 표시하세요. - 습도와 기온의 결측을 탐색하고,
geom_miss_point()로 결측을 표시하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Explore the missingness in wind and air temperature, and
# display the missingness using `geom_miss_point()`
ggplot(oceanbuoys,
aes(x = ___,
y = ___)) +
geom_miss_point()
# Explore the missingness in humidity and air temperature,
# and display the missingness using `geom_miss_point()`
ggplot(___,
aes(x = ___,
y = ___)) +
geom_miss_point()