miscTools (version 0.6-22)

triang: Upper triangular matrix from a vector

Description

Creates an upper triangular square matrix from a vector.

Usage

triang( v, n )

Arguments

v

vector

n

desired dimension of the returned square matrix

See Also

veclipos.

Examples

Run this code
# NOT RUN {
   v <- c( 1:5 )
   triang( v, 3 )
# }

Run the code above in your browser using DataCamp Workspace