Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

matrix-tslag

Lagged or Leading Vector/Matrix


Description

Creates a lagged or leading vector/matrix of selected order(s).

Usage

tslag(x, k = 1, trim = FALSE)

Arguments

k

an integer value, the number of positions the new series is to lag or to lead the input series.

x

a numeric vector or matrix, missing values are allowed.

trim

a logical flag, if TRUE, the missing values at the beginning ans/or end of the returned series will be trimmed. The default value is FALSE.

See Also

pdl.

Examples

## tslag -
   #

fBasics

Rmetrics - Markets and Basic Statistics

v3042.89.1
GPL (>= 2)
Authors
Diethelm Wuertz [aut], Tobias Setz [cre], Yohan Chalabi [ctb] Martin Maechler [ctb]
Initial release
2017-11-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.