triang.RdCreates an upper triangular square matrix from a vector.
triang( v, n )If the vector has less elements than the upper triangular matrix, the last elements are set to zero.
v <- c( 1:5 )
triang( v, 3 )
#> [,1] [,2] [,3]
#> [1,] 1 2 3
#> [2,] 0 4 5
#> [3,] 0 0 0