summaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorSuraj Yerramilli2015-09-09 09:31:32 +0530
committerSuraj Yerramilli2015-09-09 09:31:32 +0530
commit3d6d85a50138a828403ef2b19164ae5ae6fe30df (patch)
tree626d01da07d6daaf2086d082392118490f57b0d7 /R
parentff33894bc6b4e843f62c8e1b131b7f88a84a59dd (diff)
downloadSysID-R-code-3d6d85a50138a828403ef2b19164ae5ae6fe30df.tar.gz
SysID-R-code-3d6d85a50138a828403ef2b19164ae5ae6fe30df.tar.bz2
SysID-R-code-3d6d85a50138a828403ef2b19164ae5ae6fe30df.zip
Minor corrections
Diffstat (limited to 'R')
-rw-r--r--R/preprocess.R3
1 files changed, 2 insertions, 1 deletions
diff --git a/R/preprocess.R b/R/preprocess.R
index 698e016..3edd3ba 100644
--- a/R/preprocess.R
+++ b/R/preprocess.R
@@ -189,10 +189,11 @@ dataSlice <- function(data,start=NULL,end=NULL,freq=NULL){
stop("Not an idframe data")
indexWindow <- function(y,start,end,freq){
- Y <- as.matrix(y); z <- as.vector(time(y))
+ 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
}
if(nOutputSeries(data)!=0)
outputData(data) <- indexWindow(outputData(data),start,end,freq)