为什么tbl_df会影响decompose()?

时间:2018-01-02 05:02:27

标签: r dplyr forecasting

我一直在学习分解时间序列的基本方法。我一直在练习R。

中提供的数据集
> library(magrittr)
> library(dplyr)
> library(gdata)
> library(fpp2)
> library(seasonal)
> tsdata <- EuStockMarkets[,1]
> decompts <- decompose(tsdata, type = "mult")
> tsdata <- tbl_df(tsdata)
> decompts <- decompose(tsdata, type = "mult")
Error in decompose(tsdata, type = "mult") : 
time series has no or less than 2 periods

直接在tsdata上运行decompose命令处理它时,为什么让tbl_df格式的数据出错?

0 个答案:

没有答案