Why are the boxplots so different?
boxplot(loan.part.value ~ platform, p2p)
ggplot(p2p, aes(loan.part.value, platform)) + geom_boxplot()
(I redacted the tick labels.)
> 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
Because the order is switched in one of your plots. In boxplot
the formula is y ~ x
where as ggplot2
has the first positional argument of x
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.