【发布时间】:2019-04-18 09:39:28
【问题描述】:
这是我的代码 -
uc_ts_plot <- ggplot(monthly_sales, aes(DATE,DAUTONSA)) + geom_line(na.rm=TRUE) +
+ xlab("Month") + ylab("Auto Sales in Thousands") +
+ scale_x_date(labels = date_format(format= "%b-%Y"),breaks = date_breaks("1 year")) +
+ stat_smooth(colour = "green")
uc_ts_plot
错误 -
geom_smooth() using method = 'loess' and formula 'y ~ x'
Error in seq.int(r1$year, to$year, by) : 'from' must be a finite number
In addition: Warning message:
Removed 627 rows containing non-finite values (stat_smooth).
有什么帮助吗?我指的是这个链接 - https://rstudio-pubs-static.s3.amazonaws.com/343096_90b218e393454f79a5012e7ad0913e76.html 但这里的代码不起作用。
【问题讨论】:
-
欢迎来到 Stack Overflow。请阅读帮助页面(stackoverflow.com/help),参加 SO 之旅(stackoverflow.com/tour),阅读如何提出好问题(stackoverflow.com/help/how-to-ask),以及这个问题清单(codeblog.jonskeet.uk/2012/11/24/…)。最后请学习如何创建一个最小、完整和可验证的示例 (stackoverflow.com/help/mcve)。
标签: r