This is just a check to make sure that lab procedure was consistent and effective. The relationship between wet weight and dry weight should be linear.
Linear equation
lm_eqn <- function(alldata){
m <- lm(DWt ~ WWt, alldata);
eq <- substitute(italic(DWt) == a + b %.% italic(WWt)*","~~italic(r)^2~"="~r2,
list(a = format(unname(coef(m)[1]), digits = 2),
b = format(unname(coef(m)[2]), digits = 2),
r2 = format(summary(m)$r.squared, digits = 3)))
as.character(as.expression(eq));
}
Graph
a<-ggplot(data = alldata, mapping = aes(x = WWt, y = DWt)) + geom_point(aes(colour = Site)) +geom_smooth(method=lm)+ geom_text(x = 50, y = 30, label = lm_eqn(alldata), parse = TRUE)+ ggtitle("Total dry weight vs total weight weight")+ theme(plot.title = element_text(size = 12, face = "plain")) +theme(axis.text=element_text(size=12),axis.title=element_text(size=12,face="plain")) + ylab(" ") + xlab(" ") + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.background = element_blank(), axis.line = element_line(colour = "black"))
annotate_figure(a,
top = text_grob("", color = "black", face = "plain", size = 14), left = text_grob("Total Dry Weight (g)", color = "black", rot = 90, size=12), bottom = text_grob("Total Wet Weight (g) ", color = "black", rot = 0, size=12))
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 34 rows containing non-finite values (stat_smooth).
## Warning: Removed 34 rows containing missing values (geom_point).