xbar <- colMeans(df)
pos <- barplot(xbar)
std <- apply(df, 2, sd)
par(xpd = TRUE)
arrows(pos, xbar - std, pos, xbar + std, length = 0.1, angle = 90, code = 3)
Данные
df <- structure(list(
Avg_number_1m = c(15.2, 16.2, 14.4, 14.6, 15.2, 14, 13.8, 10.8, 12.4, 15.6, 7.6, 13.8, 10.8, 15.2, 16.2, 12.4, 14.6, 15.2, 14, 11),
Avg_number_2m = c(15, 15.4, 9.2, 5.6, 13, 12, 7.8, 5.8, 9.6, 11, 7.4, 7.8, 5.8, 15, 15.4, 9.2, 5.6, 13, 14.4, 5.2),
Avg_number_3m = c(15.2, 14.2, 3.2, 10.4, 7.4, 13, 7.2, 4.4, 6.8, 7.2, 9, 7.2, 4.4, 15.2, 14.2, 3.2, 10.4, 7.4, 13.2, 4.4),
Avg_number_4m = c(12, 15.4, 1.6, 9.2, 3, 11.2, 2, 2.4, 2.6, 1.8, 1.8, 2, 1.6, 12, 15, 1.6, 9.2, 3, 13.8, 0.8)
), class = "data.frame", row.names = c("Tree_1", "Tree_2", "Tree_3", "Tree_4", "Tree_5", "Tree_6", "Tree_7", "Tree_8", "Tree_9", "Tree_10",
"Tree_11", "Tree_12", "Tree_13", "Tree_14", "Tree_15", "Tree_16", "Tree_17", "Tree_18", "Tree_19", "Tree_20"))