I am trying to add a mean point for both Experimental and Control, and connect those points with a line to show both progressions over time. I am not sure how to add in the means for two separate things, only for the entire site as seen below. Also, is it possible to distinguish control/experimental at each site through point color? Thank you!
Here is a look at the df I have
Here is the code I have so far:
PDHA22 <- read.csv("2022 Master.csv")
head(PDHA22)
df <- data.frame(PDHA22)
head(df)
ggplot(df, aes(x = Week, y = PD, color = Site)) +
geom_point(position = position_jitterdodge(),size = 1.5, alpha = 0.8, pch = 20) +
stat_summary(geom = "point",
fun.data = mean_sdl,
fun.args = list(mul = 1),
color = "black")
Here is an image of what I currently have
Trevor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.