I need to make some rarefaction curves and I wish them to display the whiskers at the edges of the confidence interval bars, whereas the default is to simply display the bars without whiskers:
library(vegan)
data("dune")
result <- specaccum(dune)
plot(result, lwd=2)
I've tried to add some whiskers using the arrows function, but the results from the specaccum function only include the standard deviation. So I ended up with half the job done:
samples <- result$sites
error <- result$sd
richness <- result$richness
arrows(samples, richness-error, samples, richness+error, angle=90, code=3, length=0.05)
From what I've searched, the most common approach would be to convert the confidence intervals into a shaded area (by using the argument ci.type="polygon") and then add a boxplot to the plotted curve. However, this leads to a very busy image that I'd rather avoid.
Does anyone have a more elegant solution?


