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

lead.lag

Shift an Fts ojbect in time


Description

Shift an Fts ojbect forward or backwards in time be the supplied number of periods

Usage

## S3 method for class 'fts'
lead(x, k, ...)
## S3 method for class 'fts'
lag(x, k, ...)

Arguments

x

An Fts object

k

number of periods to shift

...

further arguments to function

Details

removed elements are replaced with NA

Value

an Fts object

Author(s)

Whit Armstrong

Examples

x <- fts(index=seq(from=Sys.Date(),by="days",length.out=10),data=1:10)
print(x)
lag(x,1)
lead(x,1)

fts

R Interface to 'tslib' (a Time Series Library in C++)

v0.9.9.2
GPL-3
Authors
Whit Armstrong <armstrong.whit@gmail.com>
Initial release

We don't support your browser anymore

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