After reviewing other stackoverflow posts, I am attempting to add a regression line to my scatter plot with:
plot(subdata2$PeakToGone, subdata2$NO3_AVG, xlim
By default, plot regards the 1st param as x and the 2nd as y. Try
x
y
plot(y = subdata2$PeakToGone, x = subdata2$NO3_AVG, xlim = c(0, 70)) abline(lm(PeakToGone~NO3_AVG, data = subdata2))
and look if the line is visible, now. You'll find an answer to your 2nd question here.