Re: [R] question on lag.zoo

2008-03-02 Thread Gabor Grothendieck
On Sun, Mar 2, 2008 at 9:28 AM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Its a FAQ. x is of class "zoo" but z is of class "zooreg" so one is using That should be lag.zooreg > zoo.lag and the is using zooreg.lag. See question #6 in the zoo FAQ: > vignette("zoo-faq") > and also > ?lag.

Re: [R] question on lag.zoo

2008-03-02 Thread Gabor Grothendieck
Its a FAQ. x is of class "zoo" but z is of class "zooreg" so one is using zoo.lag and the is using zooreg.lag. See question #6 in the zoo FAQ: vignette("zoo-faq") and also ?lag.zoo On Sun, Mar 2, 2008 at 9:12 AM, Bo Zhou <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > I'm using zoo package now

[R] question on lag.zoo

2008-03-02 Thread Bo Zhou
Hi Guys, I'm using zoo package now. I found lag is not doing what I assumed. > x <- zoo(11:21) > z <- zoo(1:10, yearqtr(seq(1959.25, 1961.5, by = 0.25)), frequency = 4) > x 1 2 3 4 5 6 7 8 9 10 11 11 12 13 14 15 16 17 18 19 20 21 > lag(x) 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16