[R] 'lag' in R?

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Mar 22 18:30:17 CET 2001


Dr Stuart Leask wrote:
> 
> Hi there.
> I am converting some Splus syntax - is there an R equivalent for the 'lag'
> function, as in:
> Xi<-lag(X,i)
> = all the members of X are shifted along by i?

You'll find it in the package "ts":
library(ts)
lag(...)

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list