I'm trying to create a plot in R- one with both data points and a trend line. However, no matter how I change the code, whether it be the type of points or the colour, it only comes up with a very basic scatter graph. I can't change the type, the colour, or anything else. Here is the code I used:
counts = data.frame(year.counts)
counts
yearvec <- counts$Year
countvec <- counts$Number.of.birds
yearvec <- as.factor(yearvec)
plot(yearvec, countvec, type= 'b', xlab = 'Year', ylab = 'Number of birds', col = 'red')
I am a new member so couldn't embed a picture of the graph yet. Is there any reason why my graph comes out as a plain black scatter graph?