diff options
author | Suraj Yerramilli | 2015-09-10 15:38:52 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2015-09-10 15:38:52 +0530 |
commit | bd9241669649b2a59c89fad97c5bb612a05f5618 (patch) | |
tree | 3678a914ceafdd66e190511c92ae666870529b77 | |
parent | 7747ae4e5b7d5377c248249e575795de379ade20 (diff) | |
download | SysID-R-code-bd9241669649b2a59c89fad97c5bb612a05f5618.tar.gz SysID-R-code-bd9241669649b2a59c89fad97c5bb612a05f5618.tar.bz2 SysID-R-code-bd9241669649b2a59c89fad97c5bb612a05f5618.zip |
Routine retains names after operation
-rw-r--r-- | R/preprocess.R | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/R/preprocess.R b/R/preprocess.R index 3edd3ba..cd1dee4 100644 --- a/R/preprocess.R +++ b/R/preprocess.R @@ -192,8 +192,9 @@ dataSlice <- function(data,start=NULL,end=NULL,freq=NULL){ Y <- matrix(y,ncol=ncol(y)); z <- as.vector(time(y)) Y <- window(Y,start=start,end=end,frequency=freq) zw <- window(z,start=start,end=end,frequency=freq) - y <- ts(Y,start=zw[1],end=tail(zw,n=1),deltat=diff(zw)[1]) - y + temp <- ts(Y,start=zw[1],end=tail(zw,n=1),deltat=diff(zw)[1]) + colnames(temp) <- colnames(y) + temp } if(nOutputSeries(data)!=0) outputData(data) <- indexWindow(outputData(data),start,end,freq) |