
R/Exploratory data analysis
ggplot2:: geom_smooth()
ggplot의 geom_smooth()에 대해서 알아보자. geom_smooth()는 geom()함수를 사용한 시각화에서 데이터의 양이 많아서 overplotting이 발생할 때 패턴을 볼 수 있도록 smooth한 line을 제공해 데이터의 특성이나 분포를 보다 더 잘 이해할 수 있도록 돕는다. 코드를 통해 이게 무슨 말인지 이해해보자. 1. geom_smooth() ggplot(mpg, aes(displ, hwy)) + geom_point() geom_smooth() geom_smooth()의 method argument에 대해서 알아보자. ggplot(mpg, aes(displ, hwy)) + geom_point() + geom_smooth(method = 'lm') 여기서 method 인자를 따로 ..