I am trying to make a plot of year-month vs mean se level but as always, using dates made R quite difficult. My year-month data is in the format of 1859-1, 1859-2, etc. I have 1500 data entries, but the code I've been using limits the entries to 480 so my graph is very uncompleted and the trendline is also not working.
Oulu <- read_excel("C:/Users/MSI-NB/OneDrive/Documentos/Ouludata.xlsx",
col_types = c("numeric", "text", "numeric"))
plot(ym(Oulu$`Year-Month`), Oulu$`Monthly mean sea level (m)`,
xlab="Year", ylab="Monthly mean sea level (m)",
xlim = c(1, 1480), ylim=c(0, 8),
pch=4,)
abline(lm(Oulu$`Year-Month`~Oulu$`Monthly mean sea level (m)`))