So my data set is to analyse the effect of predation on salmon selected for growth. Basically I have a start and ending point, 3 different strains and 2 environments (with and without predator). Does anyone knows the best way to do this?
I was thinking of something like this drawing enter image description here
I have been trying but I can only come up either with the separated time points, in which I would have to do 2 graphs, or with and average of both.
The data set is available here.
I am using this code:
ggplot(data = aqua, mapping = aes(x = Env, y = mass, group = Strain, color = Strain))+
geom_line(stat = "summary", fun = mean, size = 1, linetype = 2)+
geom_point(stat = "summary", fun = mean, size = 3)+
stat_summary(geom = "errorbar", fun.data = mean_se, width = 0.1, size = .5)+
labs(x = "Environment", y = "Body mass (g)")+
theme(axis.title.x.bottom = element_text(size = 20), axis.title.y.left = element_text(size = 20))