[R] 'lag' in R?

Dr Stuart Leask stuart.leask at nottingham.ac.uk
Thu Mar 22 17:46:18 CET 2001


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?

Stuart

*************************************************************
Stuart Leask MA MRCPsych
Clinical Lecturer in Psychiatry
Duncan Macmillan House
Porchester Road               "Ask a clock how it works, &
Nottingham                    all it will tell you is the time"
UK   NG3 6AA
Tel: +44-0 115 969 1300 xtn 40784 Fax: 0115 955 5352
*************************************************************

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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