Eduardo M. A. M.Mendes
2012-Nov-29 17:32 UTC
[R] What am I missing when using zoo on version 2.15?
Hello I am running R versions 2.13 and 2.15. One of my codes run ok on 2.13 but on 2.15. I have tried to understand what is wrong but come up with nothing. Here is the code rm(list=ls()) graphics.off() library(R.matlab) library(zoo); library(xts); library(lattice); library(hydroGOF); a=readMat("exemplo_narmax_Aimores_MISO.mat") predicoes=zoo(cbind(a$predicoes[,,1]$Real,a$predicoes[,,1]$Predito),as.Date( a$predicoes[,,1]$data)) names(predicoes)=c("Real","Predito") ggof(obs=predicoes$Real,sim=predicoes$Predito,main="Predicao Vazao - NARMAX MISO", legend=c("Predito","Real")) ggof is a function on the hydroGOF available on CRAN. Predicoes looks like> predicoesReal Predito 2008-12-20 921 921.0000 2008-12-21 1002 1002.0000 2008-12-22 870 870.0000 2008-12-23 695 695.0000 2008-12-24 751 751.0000 2008-12-25 650 650.0000 2008-12-26 443 443.0000 .. which looks ok to me. The error msg on version 2.15 is> ggof(obs=predicoes$Real,sim=predicoes$Predito,main="Predicao Vazao -NARMAX MISO", + legend=c("Predito","Real")) Error in try.xts(x, error = "'x' needs to be timeBased or xtsible") : 'x' needs to be timeBased or xtsible Just a remainder - there is no error whatsoever on version 2.13. What am I missing? Many thanks Ed [[alternative HTML version deleted]]