Matthieu Cornec
2010-Feb-01 12:57 UTC
[R] Issue with the package dyn used together with the function loess
Hi, I am trying to use package dyn together with loess. I have the following issue in the code below when I use "predict" while specifying the "newdata" argument. Any help is welcomed. Thanks in advance. Matthieu Cornec> y <- ts(1:12, start = c(2000,2), freq = 4)^3 > x <- ts(1:9, start = c(2000,3), freq = 4)^2 > do<-cbind(x,y) > rm(x) > rm(y) > y.loess <- dyn$loess( y ~ diff(x) ,data=do) > predict(y.loess)Qtr1 Qtr2 Qtr3 Qtr4 2000 27.71035 2001 62.14381 125.00000 216.00000 343.00000 2002 512.00000 730.85619 999.29512> predict(y.loess,do)Erreur dans newx/rep(divisor, rep(M, D)) : argument non numérique pour un opérateur binaire (which translation should be Error in newx/rep(divisor, rep(M, D)) : non-numeric argument for a binary operator) [[alternative HTML version deleted]]