The lag package deals with LAGs (Linear Adjacency Graphs), a specialized directed graph where vertices are sections linked by junctions, a Section being a simply a connex collection of pixel runs, and a Run a vector of foreground pixels.