[R] Suppress horizontal mean line in beanplot()
Mohammad Tanvir Ahamed
mashranga at yahoo.com
Tue Feb 13 19:55:56 CET 2018
beanplot(count ~ spray, data = InsectSprays, what = c(FALSE, TRUE, TRUE, TRUE))
>From R function help :
what : a vector of four booleans describing what to plot. In the following order, these booleans stand for the total average line, the beans, the bean average, and the beanlines. For example, what=c(0,0,0,1) produces a stripchart
ggplot can be helpful
p <- ggplot(InsectSprays, aes(factor(spray), count, fill=factor(spray) ))+ geom_violin()
Stockholm, Sweden | mashranga at yahoo.com
On Tuesday, February 13, 2018, 7:32:22 PM GMT+1, Samuel Knapp <samuel.knapp at tum.de> wrote:
I would like to use the beanplot() function from the beanplot package.
Unfortunately, I can't find out how to suppress the dashed horizontal
line, that shows the overall mean.
In the help I've found the argument "overallline", but it only allows
for "mean" or "median" .
I have tried overallline = F, overallline="n", and overallline="", but
Strangely, I could also not find any suggestions on the internet.
Does anybody know how to do this?
## Example code using the dataset InsectSprays from datasets package
beanplot(count ~ spray, data = InsectSprays)
# How to remove the dashed horizonal line?
Lehrstuhl für Pflanzenernährung
Technische Universität München
(Chair of Plant Nutrition
Technical University of Munich)
Tel. +49 8161 71-3578
samuel.knapp at tum.de
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help