Skip to content
Prev 43610 / 398498 Next

R: lags and plots

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

            
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