Hello Michael, Thanks again for your reply. Actually, I am working with wind data.
I have some sample data for actual load. scan("/home/sam/Desktop/tt.dat") ->tt ## This is the input for the actual output of the generation t = ts(tt, start=8, end=24, frequency=1,) I have another random sequence for Generator Dispatch scan("/home/sam/Desktop/ss.dat") ->ss## Input for the Generator Dispatch s= ts(ss, start=10,end=22, frequency=1) What I want to do now to take the Max and Min difference of this two sequence (t and s) over a fixed time interval. Something like, X=max(t-s, start=10, end=12) # I have an error here, I want he difference between two over an interval Y=min(t-sx, start=10, end=12) Then predict the max and min error between time t and t+1 on the basis of information that I have at t-1. Thanks again. Sam -- View this message in context: http://r.789695.n4.nabble.com/Difference-between-two-time-series-tp819843p4080672.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.