Triangular matrices are used for reserving in general insurance.
A matrix is triangular if it is square and it has NAs in lower triangle where row+col>dim.
The apc package uses incremental triangles.
The function is.triangle tests if an object is a triangular matrix.
The function triangle.cumulative forms the cumulative version of an incremental matrix
by taking partial sums in each row.
The function triangle.incremental forms the incremental version of an cumulative matrix
by taking differences in each row.
The function vector.2.triangle turns a k*(k+1)/2 vector into a triangular matrix of
dimension k.