ym() 条目限制

问题描述 投票:0回答:0

我正在尝试绘制年月与平均 se 水平的关系图,但一如既往,使用日期使 R 变得非常困难。我的年月数据采用 1859-1、1859-2 等格式。我有 1500 个数据条目,但我一直使用的代码将条目限制为 480,所以我的图表非常不完整,趋势线也是不工作。

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)`)) 
lubridate trendline
© www.soinside.com 2019 - 2024. All rights reserved.