diff options
-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) |