title: ggplot boxplot with mean and confidence interval by group
body: <p>I'd like to make a boxplot with mean instead of median. Moreover, I would like the line to stop at 5% (lower) end 95% (upper) quantile. Here the code;</p>
  <pre><code>ggplot(data, aes(x=Cement, y=Mean_Gap, fill=Material)) +
  geom_boxplot(fatten = NULL,aes(fill=Material), position=position_dodge(.9)) +
  xlab(&quot;Cement&quot;) + ylab(&quot;Mean cement layer thickness&quot;) +
  stat_summary(fun=mean, geom=&quot;point&quot;, aes(group=Material), position=position_dodge(.9),color=&quot;black&quot;)
  </code></pre>
  <p>I'd like to change <code>geom</code> to <code>errorbar</code>, but this doesn't work. I tried <code>middle = mean(Mean_Gap)</code>, but this doesn't work either. I tried <code>ymin = quantile(y,0.05)</code>, but nothing was changing. Can anyone help me?</p>
  <p>The standard boxplot using ggplot. fill is Material:
  <img src="https://i.stack.imgur.com/4Kmqh.png" alt="The standard boxplot using ggplot. fill is Material" /></p>