how can I adjust the position errorbars of the bars, which all the error bars are shift to the right
type or paste code here
ggplot() +
geom_bar(data = mean_se,
aes(x = `Tide level`, y = Mean, fill = `Height on tree`),
stat = "identity",
position=position_dodge2()) +
geom_errorbar(data = mean_se,
aes(x = `Tide level`, ymin = Mean - se, ymax = Mean + se), width=.2,
position=position_dodge2()) +
geom_line(data = mean_se_T,
aes(x = `Tide level`, y = Mean, group = 1)) +
geom_point(data = mean_se_T,
aes(x = `Tide level`, y = Mean)) +
geom_errorbar(data = mean_se_T,
aes(x = `Tide level`, ymin = Mean - se, ymax = Mean + se),
width = 0.2,
position = position_dodge(0.05)) +
labs(x = "Tide level", y = "Average number of snails") +
theme_classic()