2013-06-13 3 views
0

박스 플롯이 너무 다른 이유는 무엇입니까? R boxplot vs ggplot2 geom_boxplot

enter image description here

ggplot(p2p, aes(loan.part.value, platform)) + geom_boxplot() 

enter image description here

boxplot(loan.part.value ~ platform, p2p) 
은 (내가 틱 레이블을 편집 됨.)

> sessionInfo() 
R version 3.0.1 (2013-05-16) 
Platform: x86_64-apple-darwin10.8.0 (64-bit) 

locale: 
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 

attached base packages: 
[1] stats  graphics grDevices utils  datasets methods base  

other attached packages: 
[1] ggplot2_0.9.3.1 

답변

3

을 주문하여 플롯 중 하나에 전환되기 때문에. boxplot에서 수식은 y ~ x입니다. 여기서 ggplot2x의 첫 번째 위치 인수를 갖습니다.