its (version 0.1.1)

its-lags: Lag Functions for Irregular Time-Series Objects

Description

Lag functions for objects of class "its".

Usage

lagIts(x,k=1)
lagdistIts(x,kmin,kmax)

Arguments

x
an object of class "its"
k, kmin, kmax
integer lag; positive value mean earlier data is assigned to a later timestamp

Value

  • An object of class "its".

Details

lag.its returns an object with the same time-stamps, but with the data shifted. lagdist.its applies lag.its over a range of lags, and appends these columns

See Also

ts, POSIXct, its-file, its-lags its-join its-times its-subset its-fin its-disp its-info its-cumdif its-arith

Examples

Run this code
a <- matrix(c(seq(by=24*60*60,length=20),1:20,41:60),nrow=20,ncol=3)
b <- as.its(a)
lagIts(b)
lagdistIts(b[,1],1,3)

Run the code above in your browser using DataCamp Workspace