Organise vector as matrix with triangle structure

Description

Organise vector as matrix with triangle structure. Useful for reserving data. It may be easy to input data as vector. This function organises data in "CL"-format, which is a cohort-age (policy year-development) year matrix

Usage

1
vector.2.triangle(v,k)

Arguments

v

vector. Length k*(k+1)/2

k

integer. Dimension

Value

The value is a list in apc.data.list format.

m

matrix with "CL" format Dimension kxk. Upper left triangle filled by v, row by row. Remaining entries NA

Author(s)

Bent Nielsen <bent.nielsen@nuffield.ox.ac.uk> 7 Feb 2015

Examples

1
2
3
#########################

vector.2.triangle(1:10,4)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.