Week 8
par(mar = c(4, 4, 1.5, 2.5), bg = NA)
bp <- barplot(means, ylim = c(0, 200), col = c("white", "black"), mgp = c(2, 0.3, 0.8),
tcl = 0.25, las = 1, axisnames = F)
mtext("Height (cm)", side = 2, line = 2.8)
mtext(c("F", "M"), side = 1, line = 0.3, at = bp)
arrows(x0 = bp, y0 = means - ses, x1 = bp, y1 = means + ses, angle = 90, code = 3,
length = 0.04)
arrows(x0 = bp[2, ], y0 = means[2], x1 = bp[2, ], y1 = means[2] - ses[2],
angle = 90, code = 2, length = 0.04, col = "white")
text(x = bp, y = means + ses + 15, labels = c("a", "b"), xpd = NA)
