Hello, I'm trying to fit a regression line to my simple scatter plot, but it just won't add, I don't get an error or anything it just won't show up on my graph. Below is my code (a bit messy apologies, I'm very new to R):
plot(SplitB$year, logcaseBsplit, xlab="Year", ylab="Log number of cases", main="Cases in the United Kingdom between 1900 and 1980")
abline(lm(SplitB$year~logcaseBsplit), col = "red")
Any suggestions as to why this may be will be greatly appreciated, thank you