zlag | R Documentation |
Computes the lag of a vector, with missing elements replaced by NA
zlag(x, d= 1)
x |
vector |
d |
compute the lag d of x |
A vector whose k-th element equals x[k-d] with x[t]=NA for t<=0
Kung-Sik Chan
##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. x=1:5 zlag(x,2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.