Boxplot with mean and standard deviation in ggPlot2 (plus Jitter)
[This article was first published on Statistic on aiR, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
When you create a boxplot in R, it automatically computes median, first and third quartile (“hinges“) and 95% confidence interval of median (“notches“).Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
But we would like to change the default values of boxplot graphics with the mean, the mean + standard deviation, the mean – S.D., the min and the max values.
Here is an example solved using ggplot2 package. Plus here are represented points (the single values) jittered horizontally.
To leave a comment for the author, please follow the link and comment on their blog: Statistic on aiR.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.