Learn R Programming

miscTools (version 0.6-28)

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

Author

Arne Henningsen

See Also

veclipos.

Examples

Run this code
   v <- c( 1:5 )
   triang( v, 3 )

Run the code above in your browser using DataLab