Tagged: R

Simple cluster bargraphs with error bars in R

Here you go.

require(sciplot)
data(ToothGrowth)
bargraph.CI(dose, len, group = supp, data = ToothGrowth,
xlab = "Dose", ylab = "Growth", x.leg = 1,
col = c("white","grey"), legend = TRUE,
ci.fun = function(x) t.test(x)$conf.int)

lineplot.CI(dose, len, group = supp, data = ToothGrowth,
xlab = "Dose", ylab = "Growth", x.leg = 1,
legend = TRUE,
ci.fun = function(x) t.test(x)$conf.int)