lag_diff: Calculate lagged differences

View source: R/incidence.R

lag_diffR Documentation

Calculate lagged differences

Description

The function returns a vector of lagged difference values using diff with initial padding

Usage

lag_diff(x, lag)

Arguments

x

vector or matrix of numeric values. In the case of a matrix, the rows indicate the time-varying observations.

lag

the lag value (numeric)


mrc-ide/ZikaModel documentation built on Sept. 14, 2022, 8:51 a.m.