stat_summary

Published onesixx on

https://blog.naver.com/coder1252/221018390661

Summarise y values at unique/binned x

http://ggplot2.tidyverse.org/reference/stat_summary.html

 

그래프에서 x 값에 대한 y값을 설정해 주는 함수 

다른 방식으로 데이터가공없이  median, mean, max, min을 그래프에 표시 할 수 있습니다.

 

 

stat_summary            operates on unique x;

stat_summary_bin  operates on binned (Grouped) x.

They are more flexible versions of stat_bin:   instead of just counting, they can compute any aggregate.

 

 

You should use the internal variable ..y.. to get the computed mean.

 

If no aggregation functions are suppled, will default to mean_se().

x <- rnorm(100)
mean_cl_boot(x)
mean_cl_normal(x)
mean_sdl(x)
median_hilow(x)

 

 

Categories: ggplot2

onesixx

Blog Owner

Leave a Reply

Your email address will not be published.