I am new to RStudio, and just trying to figure stuff out. I am trying to create a scatterplot with a regression line. I imported a data set of coordinates and was able to plot my data, however I am unable to get a regression line with the basic abline(lm(x ~y, data = datasetname), col = 'red') command. Here is my code.
plot(FSData$x, FSData$y, main = 'Almost made it work', xlab = 'xcoordinates', ylab = 'ycoordinates')
abline(lm(x~y, data = FSData))
abline(lm(x~y, data = FSData), col = 'red')
(on a side note, in videos I have watched the 'red' in col = 'red' shows up as a different color (green) and it does not do that in my console, could that be related to the problem?)
I am not getting any errors, but it is also not drawing the line.
Image of my console
Thanks for any help