diff options
author | Suraj Yerramilli | 2016-05-05 23:33:09 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2016-05-05 23:33:09 +0530 |
commit | 7f1fa99e635c6aa86f393210158517dc566decb1 (patch) | |
tree | 28bfc9ba55f517d39ed01208a4b3130b201e62ed /R/predict.R | |
parent | 52265603a039f627a216ca176abcc45b1d0bc5b0 (diff) | |
download | SysID-R-code-7f1fa99e635c6aa86f393210158517dc566decb1.tar.gz SysID-R-code-7f1fa99e635c6aa86f393210158517dc566decb1.tar.bz2 SysID-R-code-7f1fa99e635c6aa86f393210158517dc566decb1.zip |
fixing vector-> matrix errors
Diffstat (limited to 'R/predict.R')
-rw-r--r-- | R/predict.R | 4 |
1 files changed, 2 insertions, 2 deletions
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)){ |