On Tue, 03 Feb 2004 13:57:53 +0200 allan clark wrote:

> Hi all
> 
> I want to calculate certain lags of a time series and plot them
> simultaneously on a graph. can anyone help?

Something like this?

R> x <- ts(cumsum(rnorm(20)), start = 0, freq = 10)
R> plot(x)
R> lines(lag(x, k = -1), col = 4)

hth
Z

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to