lag_matrix.Rd
Creates a lagged representation of a sequence for N-gram modeling.
lag_matrix(x, N = 3)
Character vector of symbols/events.
Maximum N-gram order.
A `data.table` with columns LagN..Lag0 and index.