Given a wide panel with a Date column followed by symbol columns, returns
the same shape with each symbol column lagged by k periods. The Date
column is preserved; leading values introduced by the lag are NA_real_.
Usage
panel_lag(df, k = 1L)
Value
A data.table with the same columns as df, lagged by k.
Arguments
df
data.frame or data.table with columns Date then symbols.