时间序列绘图错误

时间:2016-03-14 16:16:08

标签: forecasting

自上周以来,我一直致力于这个项目,其中涉及建立ARIMA预测模型。我能够以时间序列格式转换数据但是当我尝试绘制时间序列数据时,它会给出以下错误。我一直在阅读与我的问题有关的回复,但不幸的是我无法扭转这个错误。我真的很感激,如果我能得到一些帮助。谢谢。 以下是代码。

data=read.csv("C:/Users/mdd/Desktop/Projects/Codes/Forecasting/data.csv",header = TRUE,sep=",",stringsAsFactors = FALSE)
View(data)
head(data)
str(data)
class(data)
is.numeric(data$sales)
is.factor(data$sales)
sales[[1]]=as.Date(sales[[1]],format='%m/%d/%Y')
sales_ts=ts(data$sales,frequency = 52,start = c(2013,1))
sales_ts
View(sales_ts)
str(sales_ts)
class(sales_ts)
is.numeric(sales_ts)
is.factor(sales_ts)
start(sales_ts) #start of time series
end(sales_ts) #start of time series
frequency(sales_ts)
summary(sales_ts)
is.na(sales_ts)

以下是我得到的错误

Error in plot.window(xlim, ylim, log, ...) : need finite 'ylim' values
In addition: Warning messages:
1: In xy.coords(x, NULL, log = log) : NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf

0 个答案:

没有答案