Re: [R] xts object translation

2013-04-07 Thread Joshua Ulrich
Use lag.xts: R> lag(x,-1) aaabbb cccddd 2001-01-02 181.1751 243.24 1689.10 267.15 2001-01-03 181.6126 242.09 1737.86 267.10 2001-01-04 NA NA NA NA Note that the sign of k is different for lag.xts than lag.zoo (and lag.default). R> lag(as.zoo(x),-1)

[R] xts object translation

2013-04-07 Thread Michela
i have an xts object: aaa bbbccc ddd 2001-01-02 179.7061239.11 1712.60 271.10 2001-01-03 181.1751243.24 1689.10 267.15 2001-01-04 181.6126242.09 1737.86 267.10 i