MatthieuStigler / tsDyn

tsDyn
tsdyn.googlecode.com
34 stars 20 forks source link

problems with dplyr lag function #5

Closed krz closed 6 years ago

krz commented 6 years ago

Hi,

I am having the same problem as described here: https://stackoverflow.com/questions/46378417/forecasting-with-tsdyn-error-in-r

tsDyn doesn't seem to function with the dplyr package loaded because dplyr overwrites the default lag function.

hannes101 commented 6 years ago

Should be possible to make tsDyn more robust, by calling the lag function from the stats package directly with stats::lag().

MatthieuStigler commented 6 years ago

The problem is actually with the package tSeriesChaos. I submitted a patch, that was merged, but I don't think the package's updated version has been yet submitted to CRAN.

https://github.com/antoniofabio/tseriesChaos/commit/9bc4a9e8e66b7be8f297ed4a63c243ef7ac74c34

In the meanwhile, just do lag <- stats::lag and whenever you need dplt version, do dplyr::lag