From 7f1fa99e635c6aa86f393210158517dc566decb1 Mon Sep 17 00:00:00 2001 From: Suraj Yerramilli Date: Thu, 5 May 2016 23:33:09 +0530 Subject: fixing vector-> matrix errors --- R/predict.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'R/predict.R') diff --git a/R/predict.R b/R/predict.R index 20c3af8..3091a82 100644 --- a/R/predict.R +++ b/R/predict.R @@ -18,7 +18,7 @@ predict.idpoly <- function(x,data,nahead=1){ ypred <- as.numeric(y) - filtered } - ts(ypred,start=start(data),deltat=deltat(data)) + matrix(ts(ypred,start=start(data),deltat=deltat(data))) } polyinv <- function(x,k){ @@ -63,7 +63,7 @@ polyinv <- function(x,k){ #' @export predict.estpoly <- function(x,newdata=NULL,nahead=1){ if(is.null(newdata)&& nahead==1){ - return(fitted(x)) + return(matrix(fitted(x))) } else{ model <- x$sys if(is.null(newdata)){ -- cgit