Delays P by a non-integer number of timesteps using a filter

lagFrac(P, TDopt)

Arguments

P

Input to delay (typically rainfall)

TDopt

Positive number with which to delay P

Value

vector of same length as P

Author

Thanks to Charles Perrin for original code. Implemented in R by Joseph Guillaume

Examples


L <- 0.6
P <- c(2, 0, 5, 1, 6, 10, 0, 0, 0)
V1 <- lagFrac(P, L)